Android N - Cannot run on lower API though minSDK set to 14

前端 未结 3 965
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 03:02

I am trying to run the APK on API 22 device after updating compileSdkVersion to N but unable to do so.

compileSdkVersion \'android-N\'
buildTool         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-10 03:27

    You can't do it without hacking the solution.
    It is a limitation of the N-Preview and you have to use only this config:

    android {
      compileSdkVersion 'android-N'
      buildToolsVersion 24.0.0 rc1
      ...
    
      defaultConfig {
         minSdkVersion 'N'
         targetSdkVersion 'N'
         ...
      }
      ...
    }
    

提交回复
热议问题