Missing Google APIs for API Level 25
Asked Answered
B

7

19

In the Android SDK Manager, I am unable to find the Google API for API Level 25. Because of this I am unable to set the compileSdkVersion to 'Google Inc.:Google APIs:25'. I am using MapActivity in my application and due to incompatible sdk version com.google.android is not supported.Is there any other way to make this work without Google API ?

Bichloride answered 10/5, 2017 at 12:5 Comment(2)
This seems to be missing from the Android SDK Manager as well. It's also missing for API level 26 in the Android SDK Manager.Frantz
It seems like "Google APIs" has been removed because it's not in any SDK > 24Kotto
M
6

You need to enable "Show Package Details" from SDK manager to see the available api levels. By default, this option is disabled from Android Studio 2.3.

enter image description here

Medlin answered 21/8, 2017 at 3:11 Comment(1)
Yes I know that. The question is about an alternative way to use MAPV1 (maps.jar) compiling with API 25. Thks.Syllabub
N
3

Try this, it's useful for you:

apply plugin: 'com.android.application' 


dependencies {

    compile 'com.google.android.gms:play-services:11.2.0'
    compile 'com.google.android.gms:play-services-maps:11.2.0'
    compile 'com.google.android.gms:play-services-location:11.2.0' 
}
Nessy answered 25/8, 2017 at 15:34 Comment(0)
L
3

Few days ago had same problem and have tried

dependencies {
compile 'com.google.android.gms:play-services:11.2.0'
compile 'com.google.android.gms:play-services-maps:11.2.0'
compile 'com.google.android.gms:play-services-location:11.2.0' 
}

but I keep getting error, so therfore I tried

 dependencies {
    compile 'com.google.android.gms:play-services:10.0.1'
    compile 'com.google.android.gms:play-services-maps:10.0.1'
    compile 'com.google.android.gms:play-services-location:10.0.1' 
    }

although it is old version but worked for me so I suggest you to try.

Lice answered 26/8, 2017 at 15:6 Comment(0)
S
2

Hopefully, you are looking for this. If you are unable to use API then use this compile for setting up.

apply plugin: 'com.android.application'
...

dependencies {
    compile 'com.google.android.gms:play-services:11.2.0'
}

for further read, this Google Play Service may helpful

Edit1 also, use this compile for using map API

com.google.android.gms:play-services-maps:11.2.0
Salpingectomy answered 25/8, 2017 at 7:30 Comment(0)
U
2

You would then need to compile it direct from the site. So edit the dependencies in the build gradle file:

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:6.5.87'
}

You can try this. Hope it works.

Unmusical answered 25/8, 2017 at 9:54 Comment(0)
C
2

You can make maps in Eclipse then sync maps files with rest of application files in Android Studio or you can directly change your application files in Android Studio according to steps given in following link.
For Eclipse follow these steps

Chisolm answered 25/8, 2017 at 20:1 Comment(0)
L
0

MapActivity is part of Google Maps API v1. And Google Maps API v1 is deprecated long time ago https://developers.google.com/maps/documentation/android-api/v1. It still worked till now but seems to be missing since SDK 25.

So we have to transition to Google Maps API v2 https://developers.google.com/maps/documentation/android-api/start. It's distributed as a part of Google Play Services library so you don't have to build with Google API to use it. You just need to add gradle dependensites as mentioned in previous answers. You also need to stop using deprecated MapActivity and start using new MapFragment.

Latium answered 27/8, 2017 at 4:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.