3

I am getting error message it says Unfortunately,Google play Services has stopped but my map works fine.It doesn't shows any errors in actual devices also.The logcat says

06-23 04:22:04.620    1879-1879/com.google.process.gapps E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.google.process.gapps, PID: 1879
    java.lang.RuntimeException: Unable to create service com.google.android.gms.clearcut.service.ClearcutLoggerIntentService: java.lang.SecurityException: attempting to read gservices without permission: Neither user 10056 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
            at android.app.ActivityThread.handleCreateService(ActivityThread.java:2568)
            at android.app.ActivityThread.access$1800(ActivityThread.java:135)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5001)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)

My build.gradle is

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

My maifest.xml is

 <permission
        android:name="com.nisos.LoqalCab.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.nisos.LoqalCab.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

I have installed com.google.android.gms-7.5.74-1997312-034-APK4Fun.com.apk and com.android.vending-v5.6.8-80360800-Android-2.3.apk

My emulator is running on api level 19 with x86 System Image

I have tried these links “Unfortunately Google Play Services has stopped” but map works fine and run google play store on android emulator .But no luck.What Am I doing wrong?

Community
  • 1
  • 1
Soham
  • 4,397
  • 11
  • 43
  • 71

2 Answers2

0

When using maps you can't use the Normal Emulator and install apks (that is no longer working, it was time ago). Now you need to install the proper emulator "Google API System Image" to let it work.

Alternatively, if the Emulator is not working because outdated (it can be for older API levels) you can donwload Genymotion emulator (which is free) that provides a wide set of devices and api levels. Genymotion does not directly allows GoogleAPIs, but you can download zip file containing google apis (the ones used when flashing custom roms) and install it in genymotion (Drag&Drop the zip over the genymotion emulator), after 1 or 2 restart, your emulator is GoogleAPI compliant :D

N Dorigatti
  • 3,482
  • 2
  • 22
  • 33
  • Thanks for you reply.I have created one Google API System Image emulator.But when I try to install the play services it says Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] . And If I run my app in the emulator it says you have to update the play service. Can you help me please. – Soham Jun 23 '15 at 10:36
  • You cant install play services on that emulator, you have to use a newer emulator or use genymotion – N Dorigatti Jun 23 '15 at 10:39
  • 1
    Ok,you now what ,your suggestion helps me out.There is one problem in the lolipop the google play service is preinstalled,and it's a older version,so my map isn't running.Any idea how to solved that?Other than lolipop it works. – Soham Jun 23 '15 at 11:01
  • I can't test, but i see there is GoogleApi emulator for lollipop 5.0.1 and 5.1.1, did you try with both? – N Dorigatti Jun 23 '15 at 11:27
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/81273/discussion-between-n-dorigatti-and-soham). – N Dorigatti Jun 23 '15 at 11:33
-1

I experienced this problem on an Android TV emulator that was previously working just fine. Adding a Google account or signing in with an existing one seemed to fix the issue for me:

Settings -> Add Account -> Sign in/ create new account

Suggestion to sign in was from http://www.techrepublic.com/article/pro-tip-install-google-play-services-on-android-emulator-genymotion/

kip2
  • 6,473
  • 4
  • 55
  • 72