Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.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
Java Gradle issuess-错误:任务的执行失败_Java_Android_Gradle - Fatal编程技术网

Java Gradle issuess-错误:任务的执行失败

Java Gradle issuess-错误:任务的执行失败,java,android,gradle,Java,Android,Gradle,我得到这个错误信息 错误:任务“:app:processDebugGoogleServices”的执行失败。 请通过更新的版本来修复版本冲突 ) 或者将com.google.android.gms的版本更新为11.0.4 我的格拉德尔 apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig {

我得到这个错误信息


错误:任务“:app:processDebugGoogleServices”的执行失败。 请通过更新的版本来修复版本冲突

) 或者将com.google.android.gms的版本更新为11.0.4

我的格拉德尔

 apply plugin: 'com.android.application'
     android {
            compileSdkVersion 26
            defaultConfig {
                applicationId "com.books.mrwan.qasswanwadar"
                minSdkVersion 17
                targetSdkVersion 26
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                vectorDrawables.useSupportLibrary = 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:26.1.0'
            implementation 'com.android.support:design:26.1.0'
            implementation 'com.android.support.constraint:constraint-layout:1.1.0'
            implementation 'com.android.support:support-vector-drawable:26.1.0'
            testImplementation 'junit:junit:4.12'
            androidTestImplementation 'com.android.support.test:runner:1.0.1'
            androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
            compile 'com.google.firebase:firebase-database:11.4.2'
            compile 'com.google.firebase:firebase-core:11.4.2'
            compile 'com.google.firebase:firebase-ads:11.0.0'
            compile 'com.google.firebase:firebase-messaging:11.0.4'
            compile 'com.google.android.gms:play-services-maps:11.0.4'
            compile 'com.google.android.gms:play-services-location:11.0.4'
        }
        apply plugin: 'com.google.gms.google-services'

我做错了什么?

试着把
编译
这个词改成
实现
并将google库的所有版本更改为15.0.0 示例:

implementation 'com.google.firebase:firebase-database:15.0.0'

应该可以使用。

我如何更改googel的版本library@MrwanYassinALGANAD只需在build.gradle应用程序中更改它,我没有找到googel库到build.gradle应用程序?@MrwanYassinALGANAD
'com.google.firebase:firebase数据库:11.4.2'
。这些是google库。错误:任务的执行失败:应用程序:transformDexArchiveWithExternalLibsDexMergerForDebug'>java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex
implementation 'com.google.firebase:firebase-database:15.0.0'