在最后一次sdk更新后,android studio找不到任何google play服务或firebase库 [英] After the last sdk update, android studio can't find any google play service or firebase library

查看:913
本文介绍了在最后一次sdk更新后,android studio找不到任何google play服务或firebase库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作项目,但昨天我更新了android sdk和sdk工具。



突然间我得到了

 无法解析:com.google.android.gms:play-services-maps:10.2.0 
无法解析:com.google.firebase: firebase-messaging:10.2.0
无法解析:com.google.firebase:firebase-core:10.2.0

在我的所有Android项目中都发生这种情况!



即使在一个离子项目中,这也可以正常工作,现在它给了我
在Android SDK中找不到gradle wrapper。可能需要更新您的Android SDK。



更新到android studio 2.3或api 25r3的任何变化? b

如果我转到模块设置>依赖项,并尝试从选择库依赖项窗口中添加这些库,我找不到它们:





我的SDK工具:

>



我已经正确配置了所有东西,因为项目是已经在工作。

我的build.gradle

  apply plugin:' com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25 .0.0'

packagingOptions $ b $'排除'META-INF / DEPENDENCIES'
排除'META-INF / NOTICE'
排除'META-INF / LICENSE'
排除'META- INF / LICENSE.txt'
'META-INF / NOTICE.txt'
}

defaultConfig {
applicationIdcom.myapp
minSdkVersion 17
targetSdkVersion 25
versionCode 3
versionName1.0
multiDexEnabled true
renderscriptTargetApi 22
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize4g
}
}

依赖项{
编译fileTree(包括:''.jar'],dir:'libs ')
编译'com。 android.support:appcompat-v7:25.0.0'
compile'c​​om.android.support:support-v4:25.0.0'
compile'c​​om.android.support:design:25.0.0'
编译'uk.co.chrisjenx:书法:2.2.0'
编译'com.facebook.android:facebook-android-sdk:4.+'
编译'com.squareup。 picasso:picasso:2.5.2'
compile'c​​om.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
compile'c​​om.google.android:flexbox:0.2.3'
编译'com.android.support:recyclerview-v7:25.0.0'
编译'com.android.support:cardview-v7:25.0.0'
编译'com.google.code。 gson:gson:2.7'
compile'org.apache.commons:commons-lang3:3.4'
compile'c​​om.google.gms:google-services:3.0.0'
compile' com.google.firebase:firebase-core:10.2.0'
compile'c​​om.google.firebase:firebase-messaging:10.2.0'
compile'c​​om.squareup.retrofit2:retrofit:2.1'
编译'com.squar eup.retrofit2:converter-gson:2. +'
compile'c​​om.squareup.retrofit2:converter-jackson:2. +'
compile'c​​om.squareup.okhttp3:okhttp:3.4.1'
compile'c​​om.squareup.okhttp3:logging-interceptor:3.4.1'
compile'c​​om.google.android.gms:play-services-maps:10.2.0'
compile' fr.tvbarthel.blurdialogfragment:lib:2.2.0'
compile'c​​om.mattluedke:snowshoelib:1.0.4'
compile'c​​om.facebook.rebound:rebound:0.3.8'
testCompile'junit:junit:4.12'
}




$ b应用插件:'com.google.gms.google服务'

任何人都有同样的问题?

解决方案

解决方案是通过从SDK管理器中删除 google repository 并再次安装解决。


I had a working project, but yesterday I updated the android sdk and sdk tools.

and suddenly I'm getting

Failed to resolve: com.google.android.gms:play-services-maps:10.2.0
Failed to resolve: com.google.firebase:firebase-messaging:10.2.0
Failed to resolve: com.google.firebase:firebase-core:10.2.0

This is happening in all my android projects!

Even in an ionic project, that was also working fine, now it is giving me Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.

Anything changed in the update to android studio 2.3 or api 25r3 ?

If I go to module settings > dependencies and try to add these libraries from the choose library dependency window, I can't find them :

My SDK tools :

I already have everything configured correctly, since the project was already working.

my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.0'

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 3
        versionName "1.0"
        multiDexEnabled true
        renderscriptTargetApi 22
        renderscriptSupportModeEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:support-v4:25.0.0'
    compile 'com.android.support:design:25.0.0'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile 'com.facebook.android:facebook-android-sdk:4.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
    compile 'com.google.android:flexbox:0.2.3'
    compile 'com.android.support:recyclerview-v7:25.0.0'
    compile 'com.android.support:cardview-v7:25.0.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'org.apache.commons:commons-lang3:3.4'
    compile 'com.google.gms:google-services:3.0.0'
    compile 'com.google.firebase:firebase-core:10.2.0'
    compile 'com.google.firebase:firebase-messaging:10.2.0'
    compile 'com.squareup.retrofit2:retrofit:2.1'
    compile 'com.squareup.retrofit2:converter-gson:2.+'
    compile 'com.squareup.retrofit2:converter-jackson:2.+'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    compile 'com.google.android.gms:play-services-maps:10.2.0'
    compile 'fr.tvbarthel.blurdialogfragment:lib:2.2.0'
    compile 'com.mattluedke:snowshoelib:1.0.4'
    compile 'com.facebook.rebound:rebound:0.3.8'
    testCompile 'junit:junit:4.12'
}





apply plugin: 'com.google.gms.google-services'

Anyone has the same issue ?

解决方案

The solution was solved by removing google repository from the SDK manager and installing it again.

这篇关于在最后一次sdk更新后,android studio找不到任何google play服务或firebase库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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