Android 错误:未能解析:com.google.firebase:firebase核心:16.1.0
在尝试将Google Firebase连接到我的Android Studio项目时,每当我尝试同步我的项目时,我都会收到Android 错误:未能解析:com.google.firebase:firebase核心:16.1.0,android,firebase,Android,Firebase,在尝试将Google Firebase连接到我的Android Studio项目时,每当我尝试同步我的项目时,我都会收到“错误:无法解析:com.Google.Firebase:Firebase core:16.1.0” 我见过很多人有类似的问题,但他们的解决方案似乎都不适合我。(尽管他们似乎为他们工作) Android Studio说问题出在我的build.gradle(Module:app)文件中。以下是: apply plugin: 'com.android.application' a
“错误:无法解析:com.Google.Firebase:Firebase core:16.1.0”
我见过很多人有类似的问题,但他们的解决方案似乎都不适合我。(尽管他们似乎为他们工作)
Android Studio说问题出在我的build.gradle(Module:app)文件中。以下是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.firebase:firebase-core:16.1.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
非常感谢您在这件事上的时间和帮助。firebase core的最新版本是
16.0.8
试试这个:
implementation 'com.google.firebase:firebase-core:16.0.8'
以下是所有firebase依赖项的链接:
一直向下滚动,您将找到最新版本。firebase core的最新版本是
16.0.8
试试这个:
implementation 'com.google.firebase:firebase-core:16.0.8'
以下是所有firebase依赖项的链接:
一直向下滚动,你会发现最新版本。即使是对'com.google.firebase:firebase core:16.0.8'的显式实现依赖,我也有类似的问题,'com.google.firebase:firebase core:16.1.0'似乎仍然需要firebase core:16.1.0'。帮助我的是升级了google服务插件,即buildscript中的类路径'com.google.gms:google services:4.2.0',顶级build.gradle中的依赖项。即使是显式实现依赖于'com.google.firebase:firebase core:16.0.8',我也遇到了类似的问题,“com.google.firebase:firebase-core:16.1.0”似乎仍然需要firebase-core:16.1.0。帮助我的是升级google服务插件,即顶级build.gradle中buildscript/dependencies中的classpath'com.google.gms:google服务:4.2.0'。