6

I have been making a project in react-native for about 4 months now using "react-native": "^0.57.4". It consists of a map-view which I am rendering/modifying/developing using "react-native-maps": "^0.22.1".

Suddenly I have this error now- "App" is having trouble with google play services. Please try again.

The above error shows up where the map should be. The map component is grey and with the "App" is having trouble with google play services. Please try again. message written on it.

I tried running it on an actual device and it runs perfectly fine. So that means its an emulator issue. Can anyone please share any insights or solution as to how to fix this on the emulator?

I am using Nexus 5P & 6P with android 9.0 *86.

Purnima Naik
  • 419
  • 1
  • 5
  • 16
  • I think your problem with Google play Console and new deals with Native and non-Native Apps – engmms Feb 08 '19 at 19:59
  • 1
    I find myself frequently deleting and recreating emulators to solve issues like this – Kai Feb 08 '19 at 22:54

3 Answers3

10

I was having the same problem today, the latest version of the com.google.android.gms.play-services-maps is the issue, downgrading to 16.0.0 fixed it.

Inside the app/build.gradle

dependencies {
   ...
 compile "com.google.android.gms:play-services-base:+" <---Remove this
 compile "com.google.android.gms:play-services-maps:+" <---Remove this
 compile "com.google.android.gms:play-services-base:16.0.1" <---Add this
 compile "com.google.android.gms:play-services-maps:16.0.0" <---Add this
}

hope it helps.

  • I'd like to pitch in some information on this since I faced the issue and have noticed this question was asked today. I too have an android application using google maps, that was the single issue. After I added "16.0.0 for play-services-maps" I was able to generate my google map. One more thing, as i was debugging I noticed there was a console error on logcat stating that google play service was incorrect version, perhaps had to do with the fact I was on the latest plugin, after I reverted the error vanished. I'm thinking that it's due to the emulator play service version? – EvOlaNdLuPiZ Feb 10 '19 at 10:03
  • Perfect! Thank you! – Purnima Naik Feb 11 '19 at 18:20
  • Has the device updated it's Google Play Services to the latest version? Searching "Google Play Services" from Google Search will yield the link to the Play Store (You cannot access this directly from the Google Play app). Anyway, make sure you've updated or downgrade until you can update Google Play Services on the device. I've had this affect me on a real device and has made be jaded when it comes to updating Google dependencies as not all clients have received the Play Services update. – Jsyntax Feb 19 '19 at 22:29
  • The maps library does a Play Services availability check internally using what appears to be a hardcoded version number. In version 16.0.0 of the maps library, the number is 12451000. In version 16.1.0, it's 13400000. Interestingly, both libraries appear to state dependencies on version 16.0.1 of the play-services-basement library, which is where the Play Services version number that ends up in the app manifest is stored. That version number in that version of the library is 12451000, which matches the version in 16.0.0 but not 16.1.0 of the maps library. So, seems to be a Play Services issue? – clownba0t Mar 13 '19 at 09:59
1

Sometimes the solution might be upgrading the google play services, if you are using "react-native": "^0.59.8" and "react-native-maps": "^0.24.1".

Go to

Settings --> Android SDK --> SDK Tools(tab) --> Android SDK Build-Tools

and apply available updates. Refer this for further details on how to upgrade google play services.

Muaz
  • 133
  • 2
  • 12
0

I'm not using ReactNative, but following the instructions on setting up the FirebaseSDK solved the issue for me. See my answer here about adding firebase-core

wsgeorge
  • 1,928
  • 17
  • 20