的build.gradle(Module.app)搖籃DSL方法未找到: 'complie()' 與火力依賴性
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.example.pranav.mychat"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
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'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bumptech.glide:glide:3.6.1'
complie 'com.google.firebase:firebase-database:9.6.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
的build.gradle(項目:MyChat)
// 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:2.3.3'
classpath 'com.google.gms:google-services:3.1.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
}
當我在build.gradle中添加Firebase實時依賴項時
沒有找到搖籃DSL方法:10(應用模塊):「complie()」的錯誤發生
但是當我刪除火力實時依賴性那麼就沒有問題gradle這個建
我應該怎麼做什麼?
請在您的第一個依賴項部分查看此complie com.google.firebase:firebase-database:9.6.1''。改變它編譯,它應該工作。 – Nico