MinSdk! = DeviceSdk

Hi guys, recently started developing Android. I feel that this is a very stupid question, but I will shoot anyway, since I spent an hour on it. I'm currently trying to run a project on my device, without any changes to what Android Studio gave me. I think this image should better describe my problem:

enter image description here

On startup, I get Failure [INSTALL_FAILED_OLDER_SDK] .

I do not understand why they are incompatible. Rather, why does minSdk say API 20 when minSdkVersion on build.gradle says 15? I tried adding uses-sdk to manifest.xml, but I decided that it would be superfluous since the build.gradle file would overwrite this (it doesn't work either).

Did I miss some setup here?

+8
android android-studio
source share
2 answers

For some reason, using 'L' as targetSdkVersion makes minSdkVersion ignored. You must set targetSdkVersion for something other than L

+4
source share

It's not a mistake. This is a feature :).

If you compile on a preview platform, you can only run on a preview platform.

You must set targetSdkVersion and compileSdkVersion in API 19 .

You can read more about this problem here:

Issue 72617: Android Studio Compatible: No, minSdk (API 20, Lpreview)! = DeviceSdk (API 19)

Problem 72453: Setting sdkCompileVersion to 'android-L' creates apk with 'L' as minSdk, regardless of the lower value of minSdkVersion

+4
source share

All Articles