相关疑难解决方法(0)

Gradle:项目的多个变体:myLib匹配使用者属性

我写了一个图书馆myLib用途RemoteMessageFirebase,应用程序本身也使用Firebase.

使用gradle 4.7.也见于4.4.1.

怎么解决?

project.gradle

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.3.0'
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

app.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.test.app"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    dexOptions {
        preDexLibraries = false
        jumboMode = false
        javaMaxHeapSize …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio android-gradle-plugin

81
推荐指数
3
解决办法
9683
查看次数