mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Update android:targetSdkVersion from 30 to 31
Starting in August 2022, new apps will need to target API level 31 (Android 12) or higher and adjust for behavioral changes. Read more here: https://developer.android.com/google/play/requirements/target-sdk
This commit is contained in:
		
							parent
							
								
									1c54057933
								
							
						
					
					
						commit
						ec6d5d6cba
					
				
					 5 changed files with 6 additions and 3 deletions
				
			
		|  | @ -245,7 +245,7 @@ static const char *APK_ASSETS_DIRECTORY = "res://android/build/assets"; | ||||||
| static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/installTime/src/main/assets"; | static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/installTime/src/main/assets"; | ||||||
| 
 | 
 | ||||||
| static const int DEFAULT_MIN_SDK_VERSION = 19; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
 | static const int DEFAULT_MIN_SDK_VERSION = 19; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
 | ||||||
| static const int DEFAULT_TARGET_SDK_VERSION = 30; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
 | static const int DEFAULT_TARGET_SDK_VERSION = 31; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
 | ||||||
| const String SDK_VERSION_RANGE = vformat("%s,%s,1", DEFAULT_MIN_SDK_VERSION, DEFAULT_TARGET_SDK_VERSION); | const String SDK_VERSION_RANGE = vformat("%s,%s,1", DEFAULT_MIN_SDK_VERSION, DEFAULT_TARGET_SDK_VERSION); | ||||||
| 
 | 
 | ||||||
| void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { | void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { | ||||||
|  |  | ||||||
|  | @ -59,6 +59,7 @@ | ||||||
|             android:theme="@style/GodotAppSplashTheme" |             android:theme="@style/GodotAppSplashTheme" | ||||||
|             android:launchMode="singleTask" |             android:launchMode="singleTask" | ||||||
|             android:excludeFromRecents="false" |             android:excludeFromRecents="false" | ||||||
|  |             android:exported="true" | ||||||
|             android:screenOrientation="landscape" |             android:screenOrientation="landscape" | ||||||
|             android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|density|keyboard|navigation|screenLayout|uiMode" |             android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|density|keyboard|navigation|screenLayout|uiMode" | ||||||
|             android:resizeableActivity="false" |             android:resizeableActivity="false" | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ ext.versions = [ | ||||||
|     androidGradlePlugin: '7.0.3', |     androidGradlePlugin: '7.0.3', | ||||||
|     compileSdk         : 31, |     compileSdk         : 31, | ||||||
|     minSdk             : 19, // Also update 'platform/android/java/lib/AndroidManifest.xml#minSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_MIN_SDK_VERSION' |     minSdk             : 19, // Also update 'platform/android/java/lib/AndroidManifest.xml#minSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_MIN_SDK_VERSION' | ||||||
|     targetSdk          : 30, // Also update 'platform/android/java/lib/AndroidManifest.xml#targetSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION' |     targetSdk          : 31, // Also update 'platform/android/java/lib/AndroidManifest.xml#targetSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION' | ||||||
|     buildTools         : '30.0.3', |     buildTools         : '30.0.3', | ||||||
|     kotlinVersion      : '1.6.21', |     kotlinVersion      : '1.6.21', | ||||||
|     fragmentVersion    : '1.3.6', |     fragmentVersion    : '1.3.6', | ||||||
|  |  | ||||||
|  | @ -49,6 +49,7 @@ | ||||||
|             android:process=":GodotEditor" |             android:process=":GodotEditor" | ||||||
|             android:launchMode="singleTask" |             android:launchMode="singleTask" | ||||||
|             android:screenOrientation="userLandscape" |             android:screenOrientation="userLandscape" | ||||||
|  |             android:exported="false" | ||||||
|             android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> |             android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> | ||||||
|             <layout android:defaultHeight="@dimen/editor_default_window_height" |             <layout android:defaultHeight="@dimen/editor_default_window_height" | ||||||
|                 android:defaultWidth="@dimen/editor_default_window_width" /> |                 android:defaultWidth="@dimen/editor_default_window_width" /> | ||||||
|  | @ -60,6 +61,7 @@ | ||||||
|             android:label="@string/godot_project_name_string" |             android:label="@string/godot_project_name_string" | ||||||
|             android:process=":GodotGame" |             android:process=":GodotGame" | ||||||
|             android:launchMode="singleTask" |             android:launchMode="singleTask" | ||||||
|  |             android:exported="false" | ||||||
|             android:screenOrientation="userLandscape" |             android:screenOrientation="userLandscape" | ||||||
|             android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> |             android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> | ||||||
|             <layout android:defaultHeight="@dimen/editor_default_window_height" |             <layout android:defaultHeight="@dimen/editor_default_window_height" | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
|     android:versionName="1.0"> |     android:versionName="1.0"> | ||||||
| 
 | 
 | ||||||
|     <!-- Should match the mindSdk and targetSdk values in platform/android/java/app/config.gradle --> |     <!-- Should match the mindSdk and targetSdk values in platform/android/java/app/config.gradle --> | ||||||
|     <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> |     <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" /> | ||||||
| 
 | 
 | ||||||
|     <application> |     <application> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gustavo Maciel
						Gustavo Maciel