SDK v2.15.0 and 2.15.1 triggers DexFile error and java.lang.NoClassDefFoundError for PayPalDataCollector
See original GitHub issueGeneral information
- SDK/Library version: 2.15.*
- Environment: Sandbox
- Android Version and Device: Pixel 2 XL API 26
- Braintree dependencies: implementation ‘com.android.support:appcompat-v7:26.1.0’ implementation files(‘libs/android-smart-image-view-1.0.0.jar’) implementation files(‘libs/httpmime-4.2.2.jar’) implementation ‘com.google.code.gson:gson:2.8.0’ implementation ‘com.braintreepayments.api:braintree:2.15.0’ implementation ‘com.loopj.android:android-async-http:1.4.9’ implementation ‘com.google.android.gms:play-services-wallet:+’
Issue description
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.scstorage, PID: 6507
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/paypal/android/sdk/data/collector/PayPalDataCollector;
at com.paypal.android.sdk.onetouch.core.PayPalOneTouchCore.getClientMetadataId(PayPalOneTouchCore.java:139)
at com.paypal.android.sdk.onetouch.core.CheckoutRequest.pairingId(CheckoutRequest.java:54)
at com.braintreepayments.api.PayPal.getCheckoutRequest(PayPal.java:558)
at com.braintreepayments.api.PayPal$2.success(PayPal.java:246)
at com.braintreepayments.api.internal.HttpClient$3.run(HttpClient.java:288)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.paypal.android.sdk.data.collector.PayPalDataCollector" on path: DexPathList[[zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/base.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_dependencies_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_resources_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.paypal.android.sdk.onetouch.core.PayPalOneTouchCore.getClientMetadataId(PayPalOneTouchCore.java:139)
at com.paypal.android.sdk.onetouch.core.CheckoutRequest.pairingId(CheckoutRequest.java:54)
at com.braintreepayments.api.PayPal.getCheckoutRequest(PayPal.java:558)
at com.braintreepayments.api.PayPal$2.success(PayPal.java:246)
at com.braintreepayments.api.internal.HttpClient$3.run(HttpClient.java:288)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.scstorage-Q-ok2s1_uaClWYciJPZNjw==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.<init>(DexFile.java:100)
at dalvik.system.DexFile.<init>(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.<init>(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:676)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:709)
at android.app.LoadedApk.getResources(LoadedApk.java:936)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2242)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5672)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
at android.os.Handler.dispatchMessage(Handler.java:105)
... 5 more
Application terminated.
Works perfectly in 2.14.*.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Android error randomly java.lang.NoClassDefFoundError
Second, java.lang.NoClassDefFoundError can have a number of causes: The class may be missing. The class could be present but unloadable for some reason....
Read more >Jack + Multidex NoClassDefFoundError's on all dependency ...
Actual: running on any emulator or device API 15-21 fails with java.lang.NoClassDefFoundError for all library classes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re working on a fix for this issue.
@robertoestivill we upload our artifacts to Maven Central. I believe JCenter pulls in Maven Central artifacts to host as a mirror. I’m not to sure why there is a delay for JCenter to grab a copy of 2.15.2 though.
In the meantime you could add
mavenCentral()
to your repository source list until JCenter updates this version.