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

Created on 14 Dec 2017  路  5Comments  路  Source: tipsi/tipsi-stripe

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

Most helpful comment

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

All 5 comments

@ikhsanalatsary upgrade play services to 11

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

@ikhsanalatsary so, everything is fine?

yes, it works

Awesome

Was this page helpful?
0 / 5 - 0 ratings