Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何获得正确的dependencie版本_Android_Android Studio_Android Gradle Plugin_Dependencies_Build.gradle - Fatal编程技术网

Android 如何获得正确的dependencie版本

Android 如何获得正确的dependencie版本,android,android-studio,android-gradle-plugin,dependencies,build.gradle,Android,Android Studio,Android Gradle Plugin,Dependencies,Build.gradle,我试图在我的应用程序中实现云firestore数据库。Firestore仍处于测试阶段,我不知道它需要什么版本,所以我只是复制了firebase core的相同版本。在同步之后,我收到了大量的错误信息,我一直在玩这些版本,直到只剩下一条错误信息。它建议我把我的com.google.gms:googleservices版本改成最新版本。我就是这么做的。现在,我收到以下错误消息: Error:In project 'app' a resolved Google Play services libra

我试图在我的应用程序中实现云firestore数据库。Firestore仍处于测试阶段,我不知道它需要什么版本,所以我只是复制了firebase core的相同版本。在同步之后,我收到了大量的错误信息,我一直在玩这些版本,直到只剩下一条错误信息。它建议我把我的com.google.gms:googleservices版本改成最新版本。我就是这么做的。现在,我收到以下错误消息:

Error:In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the   library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.2.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.1.0
-- Project 'app' depends onto com.google.firebase:firebase-firestore@19.0.0
-- Project 'app' depends onto com.firebaseui:firebase-ui-database@2.1.1
-- Project 'app' depends onto com.google.firebase:firebase-storage@17.0.0
-- Project 'app' depends onto com.google.firebase:firebase-auth@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
-- Project 'app' depends onto com.google.android.gms:play-services-auth@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-database@17.0.0

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
所以现在我想我的dependencie版本到处都是。我从来没有真正了解过他们,我需要一些帮助来整理他们。这是我的gradle档案

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.google.gms:google-services:4.2.0'
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

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

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.example.aapotti.thecarapp"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:17.0.0'
implementation 'com.google.firebase:firebase-storage:17.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.firebaseui:firebase-ui-database:2.1.1'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-firestore:19.0.0'
compile 'com.android.support:cardview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
api 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
android.defaultConfig.vectorDrawables.useSupportLibrary = true
}

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

转到生成->编辑库和依赖项。一个新窗口将打开。您将在右上角找到“+”符号,单击它并在搜索栏中键入关键字,然后按enter键。您只需从搜索结果中选择所需的库依赖项即可。让我知道这是否有帮助。

转到“生成->编辑库和依赖项”。一个新窗口将打开。您将在右上角找到“+”符号,单击它并在搜索栏中键入关键字,然后按enter键。您只需从搜索结果中选择所需的库依赖项即可。让我知道这是否有用