无法创建变体"android-manifest-metadata" [英] Cannot create variant 'android-manifest-metadata'

查看:210
本文介绍了无法创建变体"android-manifest-metadata"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的应用程序上载到Playstore(bundle.aab方法),并且在android 6.0上没有错误,但运行正常,但是在android 7.0设备上却出现了错误,并且没有运行该应用程序.我使用了Gradle构建类路径3.1.0-尝试通过将Gradle版本构建更新为3.2.0-alpha14'来解决问题,因此编译失败,出现以下错误消息.有谁知道我该如何解决此问题,以使我的应用程序在具有Gradle 4.7的Android 7.0设备上运行?也许此升级可以解决我认为的设备错误.谢谢!

I uploaded my app on Playstore (bundle.aab method) and it works fine with no errors on android 6.0 but got error on android 7.0 device and doens't run the app. I used the Gradle build classpath 3.1.0 - Trying to solve the problem by updating the Gradle version build to 3.2.0-alpha14' so the compile failed giving me the error message bellow. Does anyone know how may I fix this to make my app run on Android 7.0 devices with Gradle 4.7? Perhaps this upgrade fix the device error I think. Thank you!

apply plugin: 'com.android.application'


repositories {
    mavenLocal()
    maven {
        url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
    }
}

android {
    signingConfigs {
    config {
        keyAlias 'key1'
        keyPassword '*****'
        storeFile file('C:/Users/marco/.android/debug.keystore')
        storePassword 'android'
    }
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
    defaultConfig {
        multiDexEnabled true
        applicationId "net.panomaps"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 63
        versionName "5.3.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    javaCompileOptions {
            annotationProcessorOptions {
            includeCompileClasspath true
            }
        }
        vectorDrawables.useSupportLibrary = true
    }
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
    debug {
        signingConfig signingConfigs.config
    }
}
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        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.0'
        implementation 'com.android.support:support-vector-drawable:27.1.1'
        implementation 'com.google.android.gms:play-services-auth:15.0.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'
        implementation 'com.google.firebase:firebase-core:15.0.2'
        implementation 'com.google.firebase:firebase-appindexing:15.0.1'
        implementation 'com.google.firebase:firebase-config:15.0.2'
        implementation 'com.google.firebase:firebase-invites:15.0.1'
        implementation 'pub.devrel:easypermissions:1.1.2'
        implementation 'com.google.firebase:firebase-messaging:15.0.2'
        implementation 'org.xwalk:xwalk_core_library:23.53.589.4'
        implementation 'com.squareup.picasso:picasso:2.5.2'
        implementation 'com.firebaseui:firebase-ui-auth:3.1.3'
        implementation 'com.firebaseui:firebase-ui:3.1.3'
        implementation 'com.google.firebase:firebase-auth:15.1.0'
        implementation 'com.google.firebase:firebase-database:15.0.1'

        implementation 'com.github.Q42:AndroidScrollingImageView:1.3.2'

        implementation 'com.android.support:multidex:1.0.3'
    }

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


    // error message -> Cannot create variant 'android-manifest-metadata' after configuration ':app:debugApiElements' has been resolved

Gradle distributionUrl = https://services.gradle.org/distributions/gradle-4.7-all.zip

dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0-alpha14'
    classpath 'com.google.gms:google-services:3.3.0'
    }
}

错误消息->配置':app:debugApiElements'解决后,无法创建变体'android-manifest-metadata'

error message -> Cannot create variant 'android-manifest-metadata' after configuration ':app:debugApiElements' has been resolved

推荐答案

问题与Google服务有关

The issue is related to the google services

升级firebase版本和/或gradle插件版本后,我还必须升级google services插件版本

After upgrading the firebase versions and / or the gradle plugin version I also had to upgrade the google services plugin version

dependencies {
    classpath 'com.google.gms:google-services:4.0.1'
} 

这篇关于无法创建变体"android-manifest-metadata"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆