What is the difference between compileSdkVersion and targetSdkVersion?

前端 未结 11 2226
生来不讨喜
生来不讨喜 2020-11-22 10:44

I have looked at the documentation for building with Gradle, but I\'m still not sure what the difference between compileSdkVersion and targetSdkVersion

11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-22 11:33

    As a oneliner guide:

    minSdkVersion <= targetSdkVersion <= compileSdkVersion
    

    Ideally:

    minSdkVersion (lowest possible) <= targetSdkVersion == compileSdkVersion (latest SDK)
    

    Read more from this great post by Ian Lake

提交回复
热议问题