Cod*_*oga 6 android firebase android-gradle-plugin
我正在研究下面博客中的Sample
https://www.firebase.com/blog/2015-10-01-firebase-android-app-engine-tutorial.html
添加依赖项后,项目无法编译
compile 'com.firebase:firebase-client-android:2.3.1'
Run Code Online (Sandbox Code Playgroud)
其他依赖项编译没有任何问题.
'com.android.support:appcompat-v7:23.0.1'
'compile 'com.android.support:design:23.0.1'
Run Code Online (Sandbox Code Playgroud)
我哪里错了?
这是我的模块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'
}
Run Code Online (Sandbox Code Playgroud)
顶级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
}
Run Code Online (Sandbox Code Playgroud)
该项目无法编译,因为 2.3 版本不存在。你应该使用2.3.1:
compile 'com.firebase:firebase-client-android:2.3.1'
Run Code Online (Sandbox Code Playgroud)
或最新的2.4.0:
compile 'com.firebase:firebase-client-android:2.4.0'
Run Code Online (Sandbox Code Playgroud)
您可以在这里找到更多信息:
https ://www.firebase.com/docs/android/quickstart.html
| 归档时间: |
|
| 查看次数: |
22010 次 |
| 最近记录: |