Questions tagged [android-api-levels]

Each Android version is assigned a unique integer identifier, called the API Level.

As the Android platform evolves and new Android versions are released, each Android version is assigned a unique integer identifier, called the API Level. Because users install apps on older as well as the most recent versions of Android, real-world Android apps must be designed to work with multiple Android API levels.

Each release of Android goes by multiple names:

  • The Android version, such as Android 4.4
  • The API level, such as "API Level 19"
  • A dessert name, such as "KitKat"

Each Android device supports exactly one API level – this API level is guaranteed to be unique per Android platform version. The API level exactly identifies the version of the libraries that your app can call into; it identifies the combination of manifest elements, permissions, etc. that you code against as a developer. Android's system of API levels helps Android determine whether an application is compatible with an Android system image prior to installing the application on a device. When an application is built, it contains the following API level information:

  • The target API level of Android that the app is built to run on.
  • The minimum API level of Android that is required to run the app.

These settings are used to ensure that the functionality needed to run the app correctly is available on the Android device at installation time. If not, the app is blocked from running on that device. For example, if the API level of an Android device is lower than the minimum API level that you specify for your app, the Android device will prevent the user from installing your app.

Source: https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/

324 questions
20
votes
7 answers

Android Studio Suddenly started to display unable to resolve com.android.support...25.0.0 error messages and all of my java files are erroneous now?

My project was working very fine, but until one day, when I uploaded my project to github. I don't know if this issue is related to that but today when I compiled my android studio project, it started showing me these 4 horrible errors. I have tried…
19
votes
4 answers

Android APIv29 FileNotFoundException EACCES (Permission denied)

I'm not able to access storage when building for targetSdkVersion v29. Here is my gradle configuration: compileSdkVersion 29 buildToolsVersion "29.0.2" ... minSdkVersion 15 targetSdkVersion 29 NOTE that…
13
votes
3 answers

getSize() deprecated in API level 30

I used the getSize() method to get the screen sizes: override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val fragmentActivity = requireActivity() ... val wm = fragmentActivity.getSystemService(Context.WINDOW_SERVICE) as…
alexrnov
  • 2,346
  • 3
  • 18
  • 34
13
votes
1 answer

How to check if the Battery Saver Mode is enabled on Android < 5.0?

As I know, there are some devices with version < 5.0 that have the Power Saver option. An answer provided in this similar question is not correct and doesn't explain anything. On Android 5.0+ we can use this script here: PowerManager powerManager =…
user6367252
13
votes
3 answers

How to Use Unsupported Exception for Lower Platform Version

I have a DialogFragment that handles login and fingerprint authentication for my application. This fragment uses two classes that are exclusive to API 23, KeyGenParameterSpec and KeyPermanentlyInvalidatedException. I had been under the impression…
11
votes
0 answers

How to reliably get the screen unlock event for API Level >= 26?

As per official documentation,the BroadcastReceiver for screen lock/unlock events can only be registered dynamically (by calling registerReceiver from within the Activity) starting from Android O (API 26). Registering these events in the…
Ameya721
  • 171
  • 1
  • 9
11
votes
6 answers

how to Change my app's target API level from 23 to 26

I have a problem when i try to upload my app to google play console and it is the API level that is must be 26 and my app is just developped with 23 version and now i don't know how to change this API version from 23 to 26 to make it works without…
Mahrez
  • 111
  • 1
  • 1
  • 3
11
votes
4 answers

How to detect emoji support on Android by code

By code, I can make a button that inserts these 3 emojis into the text: ⚽️ On many phones when the user clicks the button, though, the problem is that ⚽️ displays as [X][X][X]. Or even worse, it displays only three empty spaces. I would like to…
Vidar Vestnes
  • 42,644
  • 28
  • 86
  • 100
11
votes
1 answer

Is there disadvantage to using Android Support Library?

Google allows us to provide newest features on older APIs using Android Standard Library. Google encourages the use of this toolset, without mentioning its downsides. Are there any like higher RAM or CPU usage, slower rendering or simmilar? Why isnt…
michnovka
  • 2,880
  • 3
  • 26
  • 58
10
votes
4 answers

React Native - upload to Google Play error: Your app currently targets API level 30 and must target at least API level 31

I got the following error while upload my app to google: 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. Change your app's target API…
Huan Huynh
  • 399
  • 6
  • 16
10
votes
0 answers

It doesn't unknown some attributes in AndroidManifest.xml for Android SDK API 33

I created a new project use API 33 but some field is not found. While API 32 also finds it without issue. It gives a warning when I open it with API 33. buid.gradle(My Application): plugins { id 'com.android.application' version '7.2.1' apply…
Halil Ozel
  • 2,482
  • 3
  • 17
  • 32
10
votes
2 answers

Downgrade Android target Api Level 23 to 22 in developer console

I uploaded a new beta testing version with Android target api level 23. Before it was 22. I did not know, that with API Level 23 there are many changes regarding permissions. I realized that after uploading the new beta testing version with api…
9
votes
2 answers

Accessing NMEA on Android API level < 24 when compiled for target API level 29?

I just tried updating the target and compile API level of our app to 29 (Android 10) and noticed that I cannot compile any more because LocationManager.addNmeaListener only accepts OnNmeaMessageListener (introduced with API level 24) instead of the…
9
votes
2 answers

Using theme references in XML drawables requires API level 21

Is there a way to make following code compatible with lower API levels:
Mir-Ismaili
  • 13,974
  • 8
  • 82
  • 100
9
votes
2 answers

If I set minAPI to 21, do I need AppCompat?

I decided to make my minimum API version 21 for Android, but does this mean it makes no sense to use the AppCompat anymore? Just use plain Material Design / no AppCompat / etc?
AJJ
  • 2,004
  • 4
  • 28
  • 42
1
2
3
21 22