Is it possible to build for Android Google APIs SDK instead of the general Android SDK with gradle?
I need the Google Maps APIs in my project therefore I need to change the build target I can find only samples with the build version "17" compileSdkVersion 17 buildToolsVersion '17.0.0'
Any idea how to do that?
If you've updated your Android Studio to 1.3. 2 version then I would suggest using Build Tools Version 23.0. 0 and compile API 23 Android 6.0. As for Gradle Version - 2.4 or higher up to latest 2.7.
If you are using Gradle for Android, you need to move to version 3.3 or higher of both the Android Gradle Plugin and Android Studio.
Search Gradle pluginsAutomatically installs Android SDK dependencies for Android Gradle builds.
i figured it out:
1) use the Android SDK Manager and get the Google APIs for the android versions you want (start it from Android Studio, it's seperate from your old sdk manager if you used eclipse before)
2)
3) In the same Project Structure window: select "Android #.#.# Google APIs"the Project SDK click Apply/OK
4) Now in your build.gradle files replace
android {
...
compileSdkVersion 17
...
}
with
android {
...
compileSdkVersion "Google Inc.:Google APIs:17"
...
}
6) restart Android Studio
this did it for me for google apis 16. If you're still having troubles:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With