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.

Java Exception in 'NativeModules' NoClassDefFoundError: com.google.android.gms.identity.intents.model.UserAddress

See original GitHub issue

screenshot_20171214-133333

deps: tipsi-stripe: ‘4.5.1’ react-native: ‘0.51.0’

build-gradle:

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"

    defaultConfig {
        applicationId "com.myApp"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 5
        versionName "1.0.0-beta.5"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
        manifestPlaceholders = [
                tipsiStripeRedirectScheme: "myscheme"
        ]
        multiDexEnabled true
    }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-config')
    compile project(':react-native-camera')
    compile project(':react-native-svg')
    compile project(':react-native-exit-app')
    compile project(':jail-monkey')
    compile project(':react-native-open-settings')
    compile project(':react-native-vector-icons')
    compile project(':react-native-image-picker')
    compile project(':tipsi-stripe')
    compile project(':react-native-device-info')
    compile project(':react-native-i18n')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile 'com.google.android.gms:play-services-wallet:10.+'
    compile 'com.google.android.gms:play-services-identity:10.+'
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile "com.facebook.react:react-native:+"  // From node_modules
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

how to resolve this?

thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
ikhsanalatsarycommented, Dec 15, 2017

Thank you @isnifer . I added into my build.gradle

compile 'com.google.android.gms:play-services-base:+'
compile 'com.google.android.gms:play-services-wallet:+'
compile 'com.google.android.gms:play-services-identity:+'

it works

1reaction
isnifercommented, Dec 14, 2017

@ikhsanalatsary upgrade play services to 11

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.noclassdeffounderror: com.google.android.gms.R ...
I had my workspace in Google Drive desktop folder in Windows; and because of the space between "Google" and "Drive", my GoogleMap project...
Read more >
com.google.android.gms.identity.intents.model
Classes. CountrySpecification, Parcelable representing a country. UserAddress, Parcelable representing an address.
Read more >
com.google.android.gms.internal.zzkj
If I understand correctly, then there are some problems with the resolution of dependencies. I tried all the solutions that I found in...
Read more >
com.google.android.gms.common.internal.zzac
How I resolved NoClassDefFoundError: com.google.android.gms.common.internal.zzac when upgrading a Google dependency.
Read more >
Active questions tagged react-native+android - Stack Overflow
google.android.gms.internal.zzmp; Fatal Exception: java.lang.NoClassDefFoundError com.google.android.gms.internal.firebase-perf.zzw; The import com.google.
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