I'm trying to execute my application in emulator having minSdkVersion 22, compileSdkVersion 25 and targetSdkVersion 25 but the emulator doesn't show my application. However, when I try to do the same with emulator having targetSdkVersion 24 my application executes successfully. I wanted to know why is this happening and how to solve this problem of version integration?
check this question:
What is the difference between compileSdkVersion and targetSdkVersion?
an example of this link says :
For example, setting this value to "11" or higher allows the system to apply a new default theme (Holo) to your app when running on Android 3.0 or higher...
target sdk version has different features for different versions
Related
My minSDK version is 16 and my targetSDK version is 27. The compileSDK version is 28.
Since the targetSDK version is 27 it should run on Oreo(8.0.0) without issues but some of the features don't work as intended. However they do work fine on Nougat.
Why is this so?
The targetSDK is stating what you built in the app to be able to handle. So, there might be a new feature in API 28 and you're saying your code was build against API 27 so if you're running on API 28 and there is support on 28 for how you used the api before, then it will try to maintain your API 27 coded behavior. There still exists the possibility your API 27 code will result in different or wrong behavior if run on API 28 though.
Please review the documentation as well:
https://developer.android.com/guide/topics/manifest/uses-sdk-element
"To maintain your application along with each Android release, you should increase the value of this attribute to match the latest API level, then thoroughly test your application on the corresponding platform version."
I am trying to upload my instant app with targetSdkVersion 25 and my installed app is also with targetSdkVersion 25.
When I try to upload my instant app on play console, I am getting the following error,
I do not see in documentation that it is mandatory to support targetSdkVersion 26. What am I missing here ?
I cannot update my targetSdkVersion to 26 since targetting for my installable and instant app should be same.
My installable app must have targetSdkVersion of 25 for now due to a dependency. Can I upload my instant app with targetSdkVersion of 25 ?
Read Prepare your development environment.
Android SDK Build-Tools 26.x or higher
Android SDK Platform Tools 25.x or higher
Android SDK Tools (latest)
You should set
compileSdkVersion 27
buildToolsVersion '27.0.3'
And
defaultConfig {
targetSdkVersion 26
}
As Android evolves with each new version, some behaviors and even
appearances might change. However, if the API level of the platform is
higher than the version declared by your app's targetSdkVersion, the
system may enable compatibility behaviors to ensure that your app
continues to work the way you expect.
For those who are still wondering about this issue. Google imposed a restriction that both Instant app and install-able app should target at least 26.
I have a problem when i'm trying use the app on a tablet.
The error is:
The android version of the tablet is 5.0.2 API 21
and the grandle settings are:
compileSdkVersion 26,
minSdkVersion 19,
targetSdkVersion 26
If i run the app on my cellphone Android version is 7.0 API 24 has no problem.
The App start on tablet but when I try to get in to a specific activity the app crashes.
Please help and thank you.
I am new to android and I have develop the app with 5.0.1 target. However, when I run the app in my mobile which has 4.4 version of android, it does not run the app that is due to version mismatch. My question is, in which version we can develop the android app which can run on all android device?
If you work on eclipse set in the AndroidManifest.xml the minSdkVersion to something below 20 (i recommend 15) and it will work also on your device:
<uses-sdk android:minSdkVersion="15"
android:targetSdkVersion="21"/>
Here you can find the sdk values for versions:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
If you work on Android Studio go in your build.gradle file and set under defaultConfig your preferences on sdk:
defaultConfig {
applicationId "mybundleID"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
UPDATE
I read now that you wanted to support ALL android devices so you can put minSdkVersion equal to 1. But i think that this is the worst thing you can do! Putting the minSdkVersion you will not be able to use some method and some libraries. You have to support the majority of the devices for a good application. As i said values between 11 and 15 are the most used now!
I'm very new to Android development and this is one of my first projects. I realized that my API Level is set to 20 when datepicker gave an "exception rasied during rendering" error.
I wanted to change the API level to 19 as the API 20 is set to wearable devices. I have installed the API 19 SDK but it doesnt appear for selection during development.
I have also tried to set -
minSdkVersion 10
targetSdkVersion 20
on build gradle but it doesn't work.
I cannot run the emulator as the API is set to 20 and it will display error on a watch :(
How do I set make the API 19 as one of the options during development as I already installed the SDK?
Set
compileSdkVersion 19
in your build.gradle.
minSdkVersion and targetSdkVersion control app installation and runtime backwards compatibility modes, not the SDK you build with.