2017-07-19 93 views
1

的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' 

Error screenshot

的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這個建

我應該怎麼做什麼?

+0

請在您的第一個依賴項部分查看此complie com.google.firebase:firebase-database:9.6.1''。改變它編譯,它應該工作。 – Nico

回答

0

這是compile你寫在您的數據庫依賴complie

+0

說明他在哪裏做了這件事比重複錯誤信息更能幫助他,不是嗎? – Nico

+1

@Nico答案更新! –

相關問題