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.

NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest

See original GitHub issue

I’m running react-native v0.40.0 with tipsi-stripe 1.4.0 and can’t get around the following error

adb logout output: I/art (25295): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.wallet.MaskedWalletRequest> E/ReactNativeJS(25295): C++ Exception in 'NativeModules': java.lang.NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest

I’ve cleared my gradle cache, tried to install all related dependancies but have been unsuccessful.

Has anyone hit this before?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

13reactions
fabriziomosconcommented, Jan 20, 2017

I have the same issues, my app compiles, but it crashes immediately after booting: react-native 0.38.0 Google Nexus 5 - genymotion Google Play services 10.0.84

logs

UncaughtException: java.lang.NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest
      at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
      at java.lang.Class.getDexCacheType(Class.java:476)
      at java.lang.reflect.Method.getReturnType(Method.java:183)
      at java.lang.Class.getDeclaredMethods(Class.java:672)
      at com.facebook.react.bridge.BaseJavaModule.findMethods(BaseJavaModule.java:404)
      at com.facebook.react.bridge.BaseJavaModule.getMethods(BaseJavaModule.java:433)
      at com.facebook.react.cxxbridge.JavaModuleWrapper.getMethodDescriptors(JavaModuleWrapper.java:76)
      at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
      at android.os.Looper.loop(Looper.java:148)
      at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
      at java.lang.Thread.run(Thread.java:818)
   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.wallet.MaskedWalletRequest" on path: DexPathList[[zip file "/data/app/<MY_APP>.DEV.debug-1/base.apk"],nativeLibraryDirectories=[/data/app/<MY_APP>.DEV.debug-1/lib/x86, /data/app/<MY_APP>.DEV.debug-1/base.apk!/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 libcore.reflect.InternalNames.getClass(InternalNames.java:53)
      at java.lang.Class.getDexCacheType(Class.java:476) 
      at java.lang.reflect.Method.getReturnType(Method.java:183) 
      at java.lang.Class.getDeclaredMethods(Class.java:672) 
      at com.facebook.react.bridge.BaseJavaModule.findMethods(BaseJavaModule.java:404) 
      at com.facebook.react.bridge.BaseJavaModule.getMethods(BaseJavaModule.java:433) 
      at com.facebook.react.cxxbridge.JavaModuleWrapper.getMethodDescriptors(JavaModuleWrapper.java:76) 
      at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
      at android.os.Handler.handleCallback(Handler.java:739) 
      at android.os.Handler.dispatchMessage(Handler.java:95) 
      at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
      at android.os.Looper.loop(Looper.java:148) 
      at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
      at java.lang.Thread.run(Thread.java:818) 
    Suppressed: java.lang.NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest
      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:338)
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
            ... 16 more
    Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.wallet.MaskedWalletRequest
      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)
            ... 15 more
   Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
01-20 15:19:48.569 2847-2872/<MY_APP>.DEV.debug I/FA: Tag Manager is not found and thus will not be used
01-20 15:19:48.781 2847-2906/<MY_APP>.DEV.debug E/AndroidRuntime: FATAL EXCEPTION: mqt_js
   Process: <MY_APP>.DEV.debug, PID: 2847
   java.lang.NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest
       at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
       at java.lang.Class.getDexCacheType(Class.java:476)
       at java.lang.reflect.Method.getReturnType(Method.java:183)
       at java.lang.Class.getDeclaredMethods(Class.java:672)
       at com.facebook.react.bridge.BaseJavaModule.findMethods(BaseJavaModule.java:404)
       at com.facebook.react.bridge.BaseJavaModule.getMethods(BaseJavaModule.java:433)
       at com.facebook.react.cxxbridge.JavaModuleWrapper.getMethodDescriptors(JavaModuleWrapper.java:76)
       at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
       at android.os.Looper.loop(Looper.java:148)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
       at java.lang.Thread.run(Thread.java:818)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.wallet.MaskedWalletRequest" on path: DexPathList[[zip file "/data/app/<MY_APP>.DEV.debug-1/base.apk"],nativeLibraryDirectories=[/data/app/<MY_APP>.DEV.debug-1/lib/x86, /data/app/<MY_APP>.DEV.debug-1/base.apk!/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 libcore.reflect.InternalNames.getClass(InternalNames.java:53)
       at java.lang.Class.getDexCacheType(Class.java:476) 
       at java.lang.reflect.Method.getReturnType(Method.java:183) 
       at java.lang.Class.getDeclaredMethods(Class.java:672) 
       at com.facebook.react.bridge.BaseJavaModule.findMethods(BaseJavaModule.java:404) 
       at com.facebook.react.bridge.BaseJavaModule.getMethods(BaseJavaModule.java:433) 
       at com.facebook.react.cxxbridge.JavaModuleWrapper.getMethodDescriptors(JavaModuleWrapper.java:76) 
       at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
       at android.os.Handler.handleCallback(Handler.java:739) 
       at android.os.Handler.dispatchMessage(Handler.java:95) 
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
       at android.os.Looper.loop(Looper.java:148) 
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
       at java.lang.Thread.run(Thread.java:818) 
    Suppressed: java.lang.NoClassDefFoundError: com.google.android.gms.wallet.MaskedWalletRequest
       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:338)
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
            ... 16 more
    Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.wallet.MaskedWalletRequest
       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)
            ... 15 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

my android/app/build.gradle dependencies

dependencies {
    compile project(':tipsi-stripe')
    compile project(':react-native-awesome-card-io')
    compile project(':react-native-fcm')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.facebook.react:react-native:+'  // From node_modules
    compile ('com.google.android.gms:play-services-gcm:10.0.1') {
        force = true;
    }
    compile 'com.google.firebase:firebase-crash:10.0.1'
}

...
// Firebase integration
apply plugin: 'com.google.gms.google-services'

SOLUTION

I had to add in my android/app/build.gradle dependencies list

compile 'com.google.android.gms:play-services-wallet:10.0.1'
1reaction
tonyhbcommented, Oct 12, 2017

This is re-occuring now that certain projects use "com.android.support:appcompat-v7:26.0.1".

Read more comments on GitHub >

github_iconTop Results From Across the Web

NoClassDefFoundError With Google Wallet and new Google ...
Looks like Google Wallet is trying to reference com.google.android.gms.R.style when it's style class is generated in com.google.android.gms.
Read more >
Android · tipsi-stripe
NoClassDefFoundError : com.google.android.gms.wallet.MaskedWalletRequest. We have fixed this issue, but if you somehow facing this bug again - please, ...
Read more >
Lcom/google/android/gms/common/internal/zzbp, 解决失败 ...
NoClassDefFoundError : Failed resolution of: Lcom/google/android/gms /common/internal/zzbq; ... 解决失败:Lcom/google/android/gms wallet maskedwalletrequest.
Read more >
KocomojoLLC / tipsi-stripe Download - JitPack
React Native Stripe binding for iOS/Android platforms ... For a physical device you need to search on Google for 'Google Play Services'.
Read more >
com.google.android.gms.wallet | Google Play services
Card class indicates whether it is a credit, debit or prepaid card. WalletConstants.BillingAddressFormat, The Google Pay API will collect the ...
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