question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This is my service config:


       <service
            android:name="com.evernote.android.job.gcm.PlatformGcmService"
            android:exported="true"
            android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
            android:process=":updater"
            >
            <intent-filter>
                <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY"/>
            </intent-filter>
        </service>

proguard: -keep class com.evernote.android.job.gcm.PlatformGcmService { *; }

exception:

FATAL EXCEPTION: main
Process: com.example.app:updater, PID: 26258
java.lang.RuntimeException: Unable to instantiate service com.evernote.android.job.gcm.PlatformGcmService: java.lang.ClassNotFoundException: Didn't find class "com.evernote.android.job.gcm.PlatformGcmService" on path: DexPathList[[zip file "/data/app/com.example.app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.app-2/lib/x86, /vendor/lib, /system/lib]]
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2746)
at android.app.ActivityThread.access$1800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.evernote.android.job.gcm.PlatformGcmService" on path: DexPathList[[zip file "/data/app/com.example.app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.app-2/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2743)
at android.app.ActivityThread.access$1800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Suppressed: java.lang.NoClassDefFoundError: com.evernote.android.job.gcm.PlatformGcmService
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:226)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
at dalvik.system.DexPathList.findClass(DexPathList.java:321)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
... 12 more
Suppressed: java.lang.ClassNotFoundException: com.evernote.android.job.gcm.PlatformGcmService
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 11 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
vRallevcommented, Mar 30, 2017

No, good idea to remove that. I’ll do this as part of #165

1reaction
vRallevcommented, Jul 13, 2016

Are you sure that you’ve added the GCM dependency?

dependencies {
    compile 'com.google.android.gms:play-services-gcm:8.4.0' // or newer
}

Also try to remove the process attribute. I’ve never tested to run the services with different processes and I wouldn’t recommend it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ProGuard Manual: Usage - Guardsquare
Recursively reads configuration options from the given file filename. -basedirectory directoryname: Specifies the base directory for all subsequent relative ...
Read more >
Configuring ProGuard | CodePath Android Cliffnotes
ProGuard is a tool to help minify, obfuscate, and optimize your code. It is not only especially useful for reducing the overall size...
Read more >
Shrink, obfuscate, and optimize your app - Android Developers
Enable shrinking, obfuscation, and optimization; R8 configuration files ... The Android Gradle plugin generates proguard-android-optimize.txt , which ...
Read more >
Android Studio Proguard config file [duplicate] - Stack Overflow
1 Answer 1 ... Go to Gradle Scripts and then look for a file called proguard-rules.pro and there you can edit it. ......
Read more >
ProGuard | Android Developers - MIT
When you create an Android project, a proguard.cfg file is automatically generated in the root directory of the project. This file defines how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found