Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play Services 7.5.0 AnalyticsService NPE onStartCommand

Has anyone run into this crash when loading Google Play 7.5.0 in their app? I'm seeing about 30 crashes a day now, without any way to reproduce. No particular Android flavour (4.4, 5, 5.1) or device (Samsung, HTC, etc..) is sticking out at me.

java.lang.RuntimeException: Unable to start service com.google.android.gms.analytics.AnalyticsService@1153b3b0 with null:     java.lang.NullPointerException
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2721)
   at android.app.ActivityThread.access$1900(ActivityThread.java:141)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1353)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:5116)
   at java.lang.reflect.Method.invokeNative(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:525)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
   at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.NullPointerException
   at com.google.android.gms.analytics.AnalyticsService.onStartCommand()
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2704)
   at android.app.ActivityThread.access$1900(ActivityThread.java:141)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1353)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:5116)
   at java.lang.reflect.Method.invokeNative(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:525)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
   at dalvik.system.NativeStart.main(NativeStart.java)

This issue has also been posted on the Analytics bug tracker, but I don't expect to see any movement there for a while: https://code.google.com/p/analytics-issues/issues/detail?id=667

Here is what is in my Gradle file:

compile 'com.google.android.gms:play-services:7.5.0'

And in my AndroidManifest (which I think is verbatim from the Google docs):

    <receiver
        android:name="com.google.android.gms.analytics.AnalyticsReceiver"
        android:enabled="true" >
        <intent-filter>
            <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
        </intent-filter>
    </receiver>

    <service
        android:name="com.google.android.gms.analytics.AnalyticsService"
        android:enabled="true"
        android:exported="false" />
like image 889
SJoshi Avatar asked Jun 30 '15 23:06

SJoshi


1 Answers

Try with the latest Google play services SDK version. It has been fixed in Google Play services 9.2.1.

like image 146
Madhan Avatar answered Oct 20 '22 14:10

Madhan