如何在build.gradle中找到Implementation()方法?

时间:2019-05-02 19:20:36

标签: android android-gradle

我想将firebase数据库添加到我的项目中,而当android firebase中的firebase构建自动的firebase依赖项时,最终发生此错误:

  

错误:找不到参数的方法Implementation()   [com.google.firebase:firebase-database:16.0.1]类型的对象   org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler。   build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "edmt.dev.androidsimsimi"
    minSdkVersion 23
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
    "android.support.test.runner.AndroidJUnitRunner"
}
    buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
          'proguard-rules.pro'
    }
}
}

dependencies {
implementation 'com.google.firebase:firebase-database:16.0.1'
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'
})
implementation 'com.android.support:appcompat-v7:25.1.1'
testCompile 'junit:junit:4.12'

//Add Library
implementation 'com.android.support:design:25.1.1'
implementation 'com.github.lguipeng:BubbleView:1.0.1'
implementation 'com.google.code.gson:gson:2.8.0'

implementation 'com.android.volley:volley:1.1.1'

}

0 个答案:

没有答案