I have an Android app that was last released targeting API level 29. I'm trying to upgrade to API level 30 with its enforced scoped storage. I'm having some difficulty implementing it, and I would like te be able to compare my app's performance under API level 30 with what it used to do under level 29. However Android Studio won't let me set targetSdk to 29 in build.gradle. It complains that "Google Play requires that apps target API level 30 or higher", and at runtime Build.VERSION.SDK_INT evaluates to 30. The SDK manager shows both Android 10.0 (29) and Android 11.0 (30) as being installed.
I don't want to release an app with with an out-of-date API, I just want to be able to try it out on my own test devices. How can I convince Android Studio to allow this?
Related
Today I got following warning from Google Play "Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs optimized for security and performance."
How can and where I should specify target API level? To be honest I didn't specify anything. I just recently moved from Unity 2018 to Unity 2020 and got following warning.
How can it be fixed? Thank you in advance
First of all, always ensure you are using the latest stable build of unity. Older versions may not have the new API levels required for the latest android versions.
Then go to:
Edit -> Project Settings -> Player -> Other Settings
If you have selected Android as the Build Platform:
Under the Identification, there will be a Minimum API Level and Target API Level.
Set the Target API Level to automatic, which will be the highest installed. If you won't have an API Level such as 31, it means you need to upgrade your unity version or install the API level manually.
if you have android studio or unchecked the ticks that Unity handles the android SDKs automatically you need to check these two folder
C:\Users\username\AppData\Local\Android\Sdk\build-tools
C:\Users\username\AppData\Local\Android\Sdk\platforms
unity has issue with sdk API 31+ (32 and so on...)
unity will download build-tools based on target sdk on player settings, if you set to automatic, it will download highest version (33 right now), which is problematic,
set target sdk to 31
or set the Target API Level to automatic, unity will search build-tools folder automatically for highest version which you need to remove any 31+ if unity has downloaded before.
if you have android studio targeting 33 for android build u must cut it to desktop and put it back for ur android build.
I am building an android app with Meteor/Cordova. My meteor is currently version 1.5, Cordova 4.3.0. My default build uses API 25 but when I try to submit my APK to the play store, I get this message:
Your app currently targets API level 25 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 26
.
How do I upgrade to API level 26?
inside mobile-config.js add
App.setPreference('android-targetSdkVersion', '26');
Go to gradle, and search for targetSdkVersion = 25 . Change it to use android targetSdkVersion = 26
I've switched to the Xamarin SDK beta channel, and they say they have Android 9.0 support there, however after switching / downloading / installing the latest SDK's and targeting Android 9.0 in my Android project, I still am not seeing the BiometricPrompt class available for consumption. I need to leverage this for facial recognition on login in my app, and to replace the FingerprintManager class (at least for Android 9 devices.)
What am I missing?
Your compile target must be set to Android 9.0 (Pie) to gain access to the API Level 28 SDK:
Then the runtime target needs to be set to Android 9.0 API level 28 (or "auto" which would be the compile target of 28). From there you can do your API level checks at runtime to determine which APIs to call.
So i'm using 2 android sdks "facebook sdk" + "google mobile ads sdk" in my android game, but when i try to select Minimum API level 15 from the dropdown of the player settings, i can't find it there. The minimum api level is 16 and higher in Unity 2017.0 and higher.
Is this a bug in the unity editor ?? Facebook sdk requires to select minimum api level 15 in order to work properly.
Thanks for your help;
This is because Unity removed support for API level 15 and below. In fact, this really didn't happen in Unity 2017.0 as you may have believed. This was done in the Unity 5.6 version.
See Unity 5.6 release note for more info on this here.
Android minimum version supported updated to 4.1 (JellyBean)
It's not a bug. Just go with API level 16.
I know that the minSdkVersion and the targetSdkVersion are what. But My system is weak and it can not run the new version of the android studio that it can supports the higher API levels than the 17 API level.
Currently, I have the older version of the android studio and it runs in my system well but it supports only up to the 17 API level. I do not need the higher API levels. Now my question is, If I use the targetSdkVersion:"17" for an application, can it run in devices with the higher API levels?
But My system is weak and it can not run the new version of the android studio that it can supports the higher API levels than the 17 API level.
AFAIK, Android Studio's speed has nothing to do with any API levels in the project that you are building.
Now my question is, If I use the targetSdkVersion:"17" for an application, can it run in devices with the higher API levels?
Yes.