minSdk != deviceSdk

前端 未结 2 1890
长发绾君心
长发绾君心 2021-02-15 11:46

I just recently started getting into Android development. I feel this is a very stupid question but I\'ll shoot anyway since I\'ve spent an hour on this already. I am currently

相关标签:
2条回答
  • 2021-02-15 12:32

    It's not a bug. It's a feature :).

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

    You should set targetSdkVersion and compileSdkVersion to API 19.

    You can read more about this problem here:

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

    Issue 72453: Setting sdkCompileVersion to 'android-L' creates an apk with 'L' as minSdk regardless of a lower minSdkVersion value

    0 讨论(0)
  • 2021-02-15 12:36

    For some reason, using 'L' as the targetSdkVersion makes it so the minSdkVersion is ignored. You should set the targetSdkVersion to something other than L.

    0 讨论(0)
提交回复
热议问题