无法解决:com.google.android.gms:play-services-basement:12.0.1 [英] Failed to resolve: com.google.android.gms:play-services-basement:12.0.1

查看:162
本文介绍了无法解决:com.google.android.gms:play-services-basement:12.0.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的依赖项

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'

    }

从RNAdMob项目获取错误。但我已经排除了gms软件包。我没有在代码中做任何更改。昨天它的工作和汇编。我想知道为什么今天不编译。我没有在任何地方添加 play-services-basement:12.0.1模块。

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.

推荐答案

android / app / build.gradle 添加以下内容:

def _ext = rootProject.ext
def _googlePlayServicesVersion = _ext.has('googlePlayServicesVersion') ? _ext.googlePlayServicesVersion : '+'

android / build.gradle 中添加

ext { 
    // dependency versions
    googlePlayServicesVersion = "+"     
}

总体而言,在未来的将来,我建议您更新项目中的gradle和SDK

In general, In next future I recomend to update gradle and SDK in your project

现在您可以尝试在 android / build.gradle 中添加Maven:

For now you can to try to add maven in android/build.gradle:

buildscript { 
 repositories { 
    maven { url "https://maven.google.com" }
    jcenter()
    ...
 ...
 allprojects { 
   repositories { 
     mavenLocal() 
     maven { url "https://maven.google.com" } 
     jcenter()
     ...
 ...

这篇关于无法解决:com.google.android.gms:play-services-basement:12.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆