gpt4 book ai didi

android - 无法解析 : com. firebase :firebase-client-android:2. 3.1

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:43:02 28 4
gpt4 key购买 nike

我正在处理下面博客中的示例

https://www.firebase.com/blog/2015-10-01-firebase-android-app-engine-tutorial.html

项目添加依赖后编译失败

compile 'com.firebase:firebase-client-android:2.3.1'

其他依赖编译没有任何问题。

'com.android.support:appcompat-v7:23.0.1'
'compile 'com.android.support:design:23.0.1'

我哪里错了?

这是我的模块 build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.tri.todoapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.firebase:firebase-client-android:2.4.0'
}

顶级gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

项目编译失败,因为版本 2.3 不存在。你应该使用 2.3.1:

compile 'com.firebase:firebase-client-android:2.3.1'

或最新的 2.4.0:

compile 'com.firebase:firebase-client-android:2.4.0'

您可以在这里找到更多信息:
https://www.firebase.com/docs/android/quickstart.html

关于android - 无法解析 : com. firebase :firebase-client-android:2. 3.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33104234/

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