Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.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 &引用;无法更改配置';的依赖项:应用程序:api';将其包含在依赖项解决方案中后;即使将gms升级到:4.0.2';_Android_Gradle_Android Gradle Plugin_Google Cloud Messaging_Build.gradle - Fatal编程技术网

Android &引用;无法更改配置';的依赖项:应用程序:api';将其包含在依赖项解决方案中后;即使将gms升级到:4.0.2';

Android &引用;无法更改配置';的依赖项:应用程序:api';将其包含在依赖项解决方案中后;即使将gms升级到:4.0.2';,android,gradle,android-gradle-plugin,google-cloud-messaging,build.gradle,Android,Gradle,Android Gradle Plugin,Google Cloud Messaging,Build.gradle,我已经搜索了很多关于这个问题的帖子,显然所有的帖子都在从3.3升级到'com.google.gms:googleservices:4.0.2'后得到了解决。然而,我仍然得到相同的错误 我需要为项目使用数据绑定。禁用它会编译项目,但我找不到绕过数据绑定的方法 任何帮助都将不胜感激 我的项目build.gradle buildscript { repositories { jcenter() google() } dependencies {

我已经搜索了很多关于这个问题的帖子,显然所有的帖子都在从3.3升级到'com.google.gms:googleservices:4.0.2'后得到了解决。然而,我仍然得到相同的错误

我需要为项目使用数据绑定。禁用它会编译项目,但我找不到绕过数据绑定的方法

任何帮助都将不胜感激

我的项目build.gradle

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

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


    }
}

allprojects {
    repositories {
        jcenter()
        google()
        maven {
            url "https://maven.google.com"
        }
        flatDir {
            dirs 'libs'
        }

    }

    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:unchecked"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {

    signingConfigs {
        WalletAppSignConfig {
            keyAlias '********'
            keyPassword '********'
            storeFile file('********')
            storePassword '********'

        }
    }

    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "********"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        buildConfigField "String", "RNS_MESSAGE_TAG", "\"payload\""
        // Sample GCM ID
        buildConfigField "String", "GCM_ID", "\"********\""

        // Default location of the CMS-D
        buildConfigField "String", "CMS_URL", "\"http://********/cms\""

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.WalletAppSignConfig
        }
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }
}

android{
    dataBinding{
        enabled=true;
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile('********') {
        transitive = true
    }

    compile '********'
    compile('net.sf.flexjson:flexjson:3.2') {
        transitive = true
    }

    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    compile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'

    compile "android.arch.lifecycle:extensions:1.0.0-alpha1"
    //compile "android.arch.persistence.room:runtime:1.0.0-alpha4"
    annotationProcessor "android.arch.lifecycle:compiler:1.0.0-alpha1"
    //annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha4"

   // compile 'com.android.support:appcompat-v7:25.3.1'

    compile 'com.android.support.constraint:constraint-layout:1.0.1'


    compile 'com.google.firebase:firebase-core:16.0.0'
    compile 'com.google.firebase:firebase-messaging:17.0.0'

    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.google.code.gson:gson:2.8.1'
    compile 'com.mcxiaoke.volley:library:1.0.19'


    //compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:support-v4:26.1.0'
    testCompile 'junit:junit:4.12'


}






android.applicationVariants.all { variant ->
    task("_generate${variant.name}Javadoc", type: Javadoc) {
        ********
        ********
         ********   }
}
//apply plugin: 'realm-android'