找不到:找不到Gradle DSL方法:' complite()'

时间:2017-10-17 07:51:42

标签: java android gradle google-cloud-firestore

我尝试在已经使用Firebase功能的项目中实施新的Cloud Firestore数据库,包括实时数据库 - 我想要"升级"。

我按照本指南工作,但我在编译Cloud Firestore库时遇到困难。 这是我目前的项目格斗: Project Gradle:

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()
    maven {
        url "https://maven.google.com"
    }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

App Gradle:

apply plugin: 'com.android.application'

enter image description hereandroid {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
    applicationId "com.example.myapp.mealplanner"
    minSdkVersion 19
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
       }
    }
productFlavors {
   }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-crash:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.firebaseui:firebase-ui-database:3.0.0'
compile 'com.firebaseui:firebase-ui-auth:3.0.0'
compile 'com.google.firebase:firebase-storage:11.4.2'
compite 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.google.android.gms:play-services:11.0.4'
}
apply plugin: 'com.google.gms.google-services'

该项目工作正常,但当我尝试添加Firebase依赖项,Picasso和Firebase UI时。这是错误。

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

你有一个错字:

而不是

compite 'com.squareup.picasso:picasso:2.5.2'

应该是

compile 'com.squareup.picasso:picasso:2.5.2'