Resolved #9840 - targetSdk set to 33

Due to the upcoming Google Play deadline (see https://support.google.com/googleplay/android-developer/answer/11926878)
We're upgrading the target SDK and build tools for Unciv.

What this means for you, is that you need to download BOTH the new Android SDK AND the new build tools to compile to Android
If you're only doing Desktop development, this will not affect you

In Android Studio:
- Double-click shift (for search)
- "SDK manager"
- Go to SDK platforms tab, select Android 13 (Tiramisu) - this will lead to an SDK download
- Go to the SDK Tools tab
- Click 'show package details' at bottom-right
- Click 33.0.2 - this will lead to a Build Tools download
This commit is contained in:
Yair Morgenstern 2023-07-24 10:41:02 +03:00
parent eb17398d78
commit 2d499703d7
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
import com.unciv.build.BuildConfig
import com.unciv.build.AndroidImagePacker import com.unciv.build.AndroidImagePacker
import com.unciv.build.BuildConfig
import java.util.Properties import java.util.Properties
plugins { plugins {
@ -8,7 +9,7 @@ plugins {
} }
android { android {
compileSdk = 32 compileSdk = 33
sourceSets { sourceSets {
getByName("main").apply { getByName("main").apply {
manifest.srcFile("AndroidManifest.xml") manifest.srcFile("AndroidManifest.xml")
@ -28,7 +29,7 @@ android {
defaultConfig { defaultConfig {
applicationId = "com.unciv.app" applicationId = "com.unciv.app"
minSdk = 21 minSdk = 21
targetSdk = 32 // See #5044 targetSdk = 33 // See #5044
versionCode = BuildConfig.appCodeNumber versionCode = BuildConfig.appCodeNumber
versionName = BuildConfig.appVersion versionName = BuildConfig.appVersion
@ -73,7 +74,7 @@ android {
// Don't add local save files and fonts to release, obviously // Don't add local save files and fonts to release, obviously
ignoreAssetsPattern = "!SaveFiles:!fonts:!maps:!music:!mods" ignoreAssetsPattern = "!SaveFiles:!fonts:!maps:!music:!mods"
} }
buildToolsVersion = "32.0.0" buildToolsVersion = "33.0.2"
} }
task("texturePacker") { task("texturePacker") {

View File

@ -20,7 +20,7 @@ By the end of this guide, you will have Unciv running locally from code, so you
![image](/docs/assets/Android_SDK_Platforms.png) ![image](/docs/assets/Android_SDK_Platforms.png)
- Click "SDK Tools" - Click "SDK Tools"
- Select "Show Package Details" in the bottom right - Select "Show Package Details" in the bottom right
- Choose version 32.0.0 under "Android SDK Build-Tools" - Choose version 33.0.2 under "Android SDK Build-Tools"
![image](/docs/assets/Android_SDK_Tools.png) ![image](/docs/assets/Android_SDK_Tools.png)
- Click "Apply" - Click "Apply"
- Restart Android Studio - Restart Android Studio