Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - What is the difference between compileSDKVersion "Google Inc.:Google APIs:22" & "22"?

Inside the Gradle.build file I see some projects using

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

and some are just using the number

compileSdkVersion="22"

What is the difference between the two?

like image 267
Nick H Avatar asked Sep 22 '15 18:09

Nick H


1 Answers

The first one builds against an android.jar that contains the long-since-discontinued Maps V1. The second one does not.

Note that the current version of Google Maps for Android, known as Maps V2, is part of the Play Services SDK and therefore does not need a special compileSdkVersion.

IMHO, the first one is a code smell, with the sole exception being if the code actually does use Maps V1.

like image 154
CommonsWare Avatar answered Sep 30 '22 18:09

CommonsWare