Android - compileSDKVersion"Google Inc.:Google API:22"和"22"之间有什么区别?

hit*_*ted 6 sdk android gradle android-manifest

在Gradle.build文件中,我看到一些项目使用

compileSdkVersion ="Google Inc.:Google API:22"

有些人只是使用这个数字

compileSdkVersion = "22"

两者有什么区别?

Com*_*are 7

第一个构建android.jar包含长期停用的Maps V1.第二个没有.

请注意,当前版本的Google Maps for Android(称为Maps V2)是Play Services SDK的一部分,因此不需要特殊功能compileSdkVersion.

恕我直言,第一个是代码气味,唯一的例外是如果代码实际上使用地图V1.