Android - compileSDKVersion "Google Inc.:Google APIs:22" 和“22”有什么区别?
Android - What is the difference between compileSDKVersion "Google Inc.:Google APIs:22" & "22"?
在 Gradle.build 文件中,我看到一些项目使用
compileSdkVersion="Google Inc.:Google APIs:22"
有些只是使用数字
compileSdkVersion="22"
两者有什么区别?
第一个基于 android.jar
构建,其中包含已停产已久的 Maps V1。第二个没有。
请注意,Android 的 Google 地图的当前版本(称为地图 V2)是 Play 服务 SDK 的一部分,因此不需要特殊的 compileSdkVersion
。
恕我直言,第一个是代码味道,唯一的例外是代码是否确实使用了 Maps V1。
在 Gradle.build 文件中,我看到一些项目使用
compileSdkVersion="Google Inc.:Google APIs:22"
有些只是使用数字
compileSdkVersion="22"
两者有什么区别?
第一个基于 android.jar
构建,其中包含已停产已久的 Maps V1。第二个没有。
请注意,Android 的 Google 地图的当前版本(称为地图 V2)是 Play 服务 SDK 的一部分,因此不需要特殊的 compileSdkVersion
。
恕我直言,第一个是代码味道,唯一的例外是代码是否确实使用了 Maps V1。