2017-07-19 135 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答案更新! –

相关问题