Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

react native - Failed to resolve: com.google.android.gms:play-services-basement:12.0.1

Here is my dependencies

dependencies {

        compile project(':react-native-fcm')
        // compile 'com.google.firebase:firebase-core:11.2.0' //FCM - this decides your firebase SDK version
        compile(project(':react-native-maps')){
            exclude group: 'com.google.android.gms', module: 'play-services-base'
            exclude group: 'com.google.android.gms', module: 'play-services-maps'
        }
        compile(project(":react-native-google-place-picker")){
            exclude group: "com.google.android.gms"
        }
        compile (project(':RNAdMob')){
            exclude group: "com.google.android.gms"
        }
        //compile project(':react-native-device-info')
        compile project(':react-native-fbsdk')
        compile (project(':react-native-mauron85-background-geolocation')){
            exclude group: "com.google.android.gms"
        }
        compile project(':react-native-android-location-enabler')
        compile project(':react-native-wheel-picker')
        compile project(':react-native-sound')

        compile project(':react-native-vector-icons')
        compile (project(':react-native-google-analytics-bridge')){
            exclude group: "com.google.android.gms"
        }
        //compile project(':react-native-device-info')
        compile(project(":react-native-device-info")){
            exclude group: "com.google.android.gms"
        }
        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.facebook.react:react-native:0.44.3"

        compile(project(":react-native-google-signin")){
            exclude group: "com.google.android.gms"
        }
        compile (project(':tipsi-stripe')){
            exclude group: "com.google.firebase"
            exclude group: "com.android.support"
            exclude group: "com.google.android.gms"
        }
        compile 'com.google.android.gms:play-services-auth:11.0.2' // should be at least 9.0.0
        compile 'com.google.android.gms:play-services-places:11.0.2'
        compile 'com.google.android.gms:play-services-maps:11.0.2'
        //compile 'com.google.android.gms:play-services-location:11.0.2'

        compile 'com.google.android.gms:play-services-wallet:11.0.2'
        compile 'com.google.android.gms:play-services-gcm:11.0.2'

        compile 'com.google.android.gms:play-services-analytics:11.0.2'
        compile 'com.google.android.gms:play-services-ads:11.0.2'

    }

Error getting from RNAdMob project. but i have excluded the gms package. I didnt do any changes in the code. Yesterday its worked and compiled. I`m wonder why today its not compiling. Im not added "play-services-basement:12.0.1" module anywhere.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Move google() to before jcenter() in your build.gradle e.g.

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...