minSdk != deviceSdk

前端 未结 2 937
猫巷女王i
猫巷女王i 2021-02-15 11:40

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:11

    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

提交回复
热议问题