Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android GcmRegister 抛异常 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceIdService; #128

Open
maxzhang opened this issue Jan 10, 2020 · 0 comments

Comments

@maxzhang
Copy link

Android 调用GcmRegister.register(),抛如下异常:

2020-01-10 20:14:15.937 12102-12195/? E/MPS:GcmRegister: register
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceIdService;
        at com.alibaba.sdk.android.push.register.GcmRegister.register(GcmRegister.java:22)
        at host.exp.exponent.MainApplication.a(MainApplication.java:206)
        at host.exp.exponent.MainApplication.onCreate(MainApplication.java:135)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1165)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6074)
        at android.app.ActivityThread.access$1300(ActivityThread.java:207)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1758)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file .....]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.alibaba.sdk.android.push.register.GcmRegister.register(GcmRegister.java:22) 

可能包依赖冲突了,开发环境如下:

  • react-native@0.59.8
  • expo@34.0.0

目前定位不到问题,不知道如何解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant