gpt4 book ai didi

android - 找不到Gradle DSL方法:具有Firebase依赖关系的 'complie()'

转载 作者:行者123 更新时间:2023-12-03 04:27:17 24 4
gpt4 key购买 nike

Build.gradle(Module.app)

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实时依赖项时

(Module:app) Gradle DSL method not found: 'complie()' error occurs



但是当我删除firebase实时依赖项时,gradle构建没有问题

我该怎么办 ?

最佳答案

您已在数据库依赖项中编写了compile就是complie

关于android - 找不到Gradle DSL方法:具有Firebase依赖关系的 'complie()',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45188726/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com