gpt4 book ai didi

android - 上次更新 sdk 后,android studio 找不到任何 google play 服务或 firebase 库

转载 作者:搜寻专家 更新时间:2023-11-01 07:46:44 25 4
gpt4 key购买 nike

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

突然间我得到了

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

这发生在我所有的 android 项目中!

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

android studio 2.3 或 api 25r3 的更新有什么变化吗?

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

when searching foor play-services

我的 SDK 工具:

enter image description here

我已经正确配置了所有内容,因为该项目已经在运行。

我的构建.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'

有人遇到同样的问题吗?

最佳答案

解决方案是通过从 SDK 管理器中删除 google 存储库 并重新安装来解决的。

关于android - 上次更新 sdk 后,android studio 找不到任何 google play 服务或 firebase 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42573603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com