Google Map not loaded?.. Is anyone faced this issue? - android

I Worked Many times in google map.. But newly facing this issue..
IS anyone faced issue like this?
I searched many times but wasn't get a good solution..
build.gradle
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
Mainfest.xml
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="My API KEY" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Logcat
03-06 16:07:38.902 10306-10306/I/Google Maps Android API: Google Play services client version: 10298000
03-06 16:07:38.942 10306-10306/ I/Google Maps Android API: Google Play services package version: 10298446

Try this
Downgrade the version of google play services in your gradle to 9.6.0
compile 'com.google.android.gms:play-services-maps:9.6.0'
compile 'com.google.firebase:firebase-messaging:9.6.0'

dont change this
"compile 'com.google.android.gms:play-services:10.2.0'
did you get the Key and insert it in Manifest.xml ?
Make sure that your google play services is already updating

Sounds like your api keys do not match any longer. Your google-services.json might have been updated by the Firebase plugin to no longer match the keys specified at https://console.developers.google.com/apis/credentials.
I had to match value of com.google.android.maps.v2.API_KEY to google-services.json
{
"current_key": "AIzaxxxxxxxx..."
}
Also you should be able to remove
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
from your manifest, since google maps does not seem to need it any longer. You can also replace com.google.android.maps.v2.API_KEY with com.google.android.geo.API_KEY according to https://developers.google.com/maps/documentation/android-api/signup

Related

Google Play Services Library Error onesignal

for a one year using onesignal to send notification , recently occured an error although the APP is installed and users are added, in sectoin "all users" notification is not reachable.
error:
google Play services library initialization error. Check for conflicting plugins and make sure "com.google.android.gms.version" is in your AndroidManifest.xml. Check the logcat for more details..
i added
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
in AndroidManifest.xml
and i have this code in buil.gradle
compile 'com.onesignal:OneSignal:3.8.4'
// Required for OneSignal, even if you have added FCM.
compile 'com.google.gms:google-services:3.2.1'
please help me.
It also happened to me. I tried many things about libraries, versions and got frustrated.
Finally, I created a new App in Onesignal. As soon as I put the new token, it started to work. No idea why, but if this is an option for you, you can try

Android google map don't show

I use google map in project, but it is dont work rightly. I have registred Google map Api Key in google services and add in my project AndroidManifest.xml
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value=" Api key" />
But it is don't show map you can see it in this picture:
When i run my app, in tab Anroid Monitor of Android Studio i have this error:
I can't find resolve.
and in Api monitor i have this error too, when i open app
java.io.IOException: Server returned: 3
Did you added play-services dependency in gradle file?
If Possible change your play-service dependency and set dependency based on building tools installed or api installed, like following way
From
compile 'com.google.android.gms:play-services-maps:10.0.1'
To
compile 'com.google.android.gms:play-services-maps:10.2.1'

Android google play services not working properly

i just update google play services package, but its not working for me.Also i add
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
to manifiset and compile 'com.google.android.gms:play-services:6.1.+' to build. gradle but its not working for me.
You are still using an old version of PLAY Service because Places was added in version v.9.4 as mention in the official docs releases too
so simply update your gms dependencies to latest one i.e.
compile 'com.google.android.gms:play-services:11.6.0'
You can also add individual API using appropriate version as mention under Table 1 here
So use individual API if you can because this will avoid the need of Multudex in future although there is no Individual APP INDEXING API build.gradle description mention in the docs

Android studio can not resolve com.google.android.gms.location.places.AutocompleteFilter

I am trying to implement a autocomplete places search following this article.
http://www.truiton.com/2015/04/android-places-api-autocomplete-getplacebyid/
I have followed all steps, and also added proper dependencies in my build.gradle file.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}
Also here are the meta data section in my manifest.
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
also I have all the required SDK components installed. Still my android studio can not resolve the places part in the following imports:
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
import com.google.android.gms.location.places.AutocompletePredictionBuffer;
import com.google.android.gms.location.places.Places;
this is how they look as they can not find the Places part.
How can I resolve this issue? I am using SDK 19 for my app.
Add compile 'com.google.android.gms:play-services-places:<version>, where <version> is perhaps at least: 9.2.1 under dependencies in your modules's build.gradle
In play-services 9.2.0 the places API is no longer located in location. Those are now in their own places dependency. To resolve those you should add this to your build.gradle.
compile 'com.google.android.gms:play-services-places:9.2.0'
check out
Places class is removed from android play services 9.2.0
The Places API was only added in Google Play services 7.0: you'll need to update your dependency to be at least 7.0.0, although the latest as of this answer is 15.0.0.
Note in almost every case, you should use selective APIs to only include the portions of Google Play services you need. In that case, you'd actually use a dependency such as
implementation 'com.google.android.gms:play-services-location:15.0.0'
Since Play Services version 9.2 we should add the following dependancy to access Google Places API.
compile 'com.google.android.gms:play-services-places:11.0.2'
The latest version at the time of this writing.
The accepted answer for this thread was outdated.
Add following two dependencies in your build.gradle(Module: app)
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
try including
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
Just add it in your dependency (build.gradle [Module:Application])
Then file -> Invalidate caches/restart-> invalidate and Restart
For latest versions of google play services for location changes have been made. Check [Selective Google Play Services API not finding classes
I was also faced with the same issue recently and adding this
implementation 'com.google.android.gms:play-services-places:11.4.0'
to my dependency under build.gradle(app) file solves the problem for me.
NB: make sure the version of your dependencies are all thesame if not you will encounter or errors

Trouble using the Google Places Api [duplicate]

I am trying to implement a autocomplete places search following this article.
http://www.truiton.com/2015/04/android-places-api-autocomplete-getplacebyid/
I have followed all steps, and also added proper dependencies in my build.gradle file.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}
Also here are the meta data section in my manifest.
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
also I have all the required SDK components installed. Still my android studio can not resolve the places part in the following imports:
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
import com.google.android.gms.location.places.AutocompletePredictionBuffer;
import com.google.android.gms.location.places.Places;
this is how they look as they can not find the Places part.
How can I resolve this issue? I am using SDK 19 for my app.
Add compile 'com.google.android.gms:play-services-places:<version>, where <version> is perhaps at least: 9.2.1 under dependencies in your modules's build.gradle
In play-services 9.2.0 the places API is no longer located in location. Those are now in their own places dependency. To resolve those you should add this to your build.gradle.
compile 'com.google.android.gms:play-services-places:9.2.0'
check out
Places class is removed from android play services 9.2.0
The Places API was only added in Google Play services 7.0: you'll need to update your dependency to be at least 7.0.0, although the latest as of this answer is 15.0.0.
Note in almost every case, you should use selective APIs to only include the portions of Google Play services you need. In that case, you'd actually use a dependency such as
implementation 'com.google.android.gms:play-services-location:15.0.0'
Since Play Services version 9.2 we should add the following dependancy to access Google Places API.
compile 'com.google.android.gms:play-services-places:11.0.2'
The latest version at the time of this writing.
The accepted answer for this thread was outdated.
Add following two dependencies in your build.gradle(Module: app)
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
try including
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
Just add it in your dependency (build.gradle [Module:Application])
Then file -> Invalidate caches/restart-> invalidate and Restart
For latest versions of google play services for location changes have been made. Check [Selective Google Play Services API not finding classes
I was also faced with the same issue recently and adding this
implementation 'com.google.android.gms:play-services-places:11.4.0'
to my dependency under build.gradle(app) file solves the problem for me.
NB: make sure the version of your dependencies are all thesame if not you will encounter or errors

Categories

Resources