What is the difference between compileSdkVersion and targetSdkVersion?

前端 未结 11 2003
生来不讨喜
生来不讨喜 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:34

    The CompileSdkVersion is the version of the SDK platform your app works with for compilation, etc DURING the development process (you should always use the latest) This is shipped with the API version you are using

    You will see this in your build.gradle file:

    targetSdkVersion: contains the info your app ships with AFTER the development process to the app store that allows it to TARGET the SPECIFIED version of the Android platform. Depending on the functionality of your app, it can target API versions lower than the current.For instance, you can target API 18 even if the current version is 23.

    Take a good look at this official Google page.

提交回复
热议问题