This app won't run unless you update Google Play services error

后端 未结 10 1972
半阙折子戏
半阙折子戏 2020-12-03 04:39

I\'m kind of lost right now. I\'m implementing an Android application using Google maps.

In order to make it work I followed some tutorials which were pretty efficie

相关标签:
10条回答
  • 2020-12-03 05:29

    I Solved this problem by:

    1- Make sure "Google Play Services" is installed in SDK tools, Like this image:

    2- Make sure AndroidManifest.xml file contain this lines:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    

    3- In dependencies of build.gradle add this line:

    classpath 'com.google.android.gms:play-services-maps:17.0.0'
    

    Note: you may need change version of play-services-maps from 17 to latest, but 17 is latest in Aug 2019 ...

    As this image:

    Don not forget to rebuild the project (if you use flutter do this command in terminal flutter clean)

    Then you will see the map is working on emulator:

    0 讨论(0)
  • 2020-12-03 05:32

    I had a problem getting this error and hitting the 'Update' button did nothing, it was stuck on a loop, what worked is the following (in Android Studio):

    • Go to Tools > Android > SDK Manager
    • Check the 'Show Package Details' option
    • Under the Android version you want (7.1.1 for me right now), check Google Play Intel x86 Atom System Image
    • Hit Apply/OK and let the image install
    • Now go to Tools > Android > AVD Manager
    • Create Virtual Device
    • Select one of the devices with a Google Play logo:
    • Run your app in the new emulator. You can now hit 'Update' when you get the error, update Google Play Services via the Play Store on your device, and test your app in peace.
    0 讨论(0)
  • 2020-12-03 05:32

    I had the same error. Fixed it by updating Android Studio along with its related Android SDK Tools.

    0 讨论(0)
  • 2020-12-03 05:38

    using android studio, the only thing that helped me was to reduce the google play services version in the gradle file from the last version to this:

    compile 'com.google.android.gms:play-services:4.2.+'
    

    (ofcourse,this is a temporary "bypass" to enable you continue running)

    0 讨论(0)
提交回复
热议问题