PingPlusPlus / pingpp-android

413 stars 190 forks source link

IWXAPIEventHandler 找不到该类 #58

Closed Justson closed 7 years ago

Justson commented 7 years ago

 Rejecting re-init on previously-failed class java.lang.Class<com.pingplusplus.android.g>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/tencent/mm/sdk/openapi/IWXAPIEventHandler;
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.Class.newInstance!() (Class.java:-2)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1086)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2811)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2985)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1635)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.os.Looper.loop() (Looper.java:154)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6692)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1468)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1358)
08-10 17:32:05.162 25782-25782/com.feelinging I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tencent.mm.sdk.openapi.IWXAPIEventHandler" on path: DexPathList[[zip file "/data/app/com.feelinging-1/base.apk"],nativeLibraryDirectories=[/data/app/com.feelinging-1/lib/arm, /system/fake-libs, /data/app/com.feelinging-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.Class.newInstance!() (Class.java:-2)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1086)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2811)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2985)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1635)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.os.Looper.loop() (Looper.java:154)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6692)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1468)
08-10 17:32:05.162 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1358)
08-10 17:32:05.168 25782-25782/com.feelinging I/art: Rejecting re-init on previously-failed class java.lang.Class<com.pingplusplus.android.PaymentActivity$3>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/baidu/android/pay/PayCallBack;
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.Class.newInstance!() (Class.java:-2)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1086)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2811)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2985)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1635)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.os.Looper.loop() (Looper.java:154)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6692)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1468)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1358)
08-10 17:32:05.168 25782-25782/com.feelinging I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.baidu.android.pay.PayCallBack" on path: DexPathList[[zip file "/data/app/com.feelinging-1/base.apk"],nativeLibraryDirectories=[/data/app/com.feelinging-1/lib/arm, /system/fake-libs, /data/app/com.feelinging-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.Class.newInstance!() (Class.java:-2)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1086)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2811)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2985)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1635)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.os.Looper.loop() (Looper.java:154)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6692)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
08-10 17:32:05.168 25782-25782/com.feelinging I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1468)

反编译出来该类是存在的。

dong11 commented 7 years ago

@Justson Lcom/tencent/mm/sdk/openapi/IWXAPIEventHandler 这个类是存在微信最新的 jar 包,SDK兼容了微信的新旧 jar 包,可以在 gradle 中设置忽略这些警告