Android Studio 3.0 Compile Issue (Cannot choose between Configurations)

后端 未结 10 837
再見小時候
再見小時候 2020-11-30 04:34

Issue with latest 3.0 build (Beta 2) My project has 1 sub module by a 3rd party so I only have access to their build.gradle.

My project has 3 flavours, snap, uat, pr

10条回答
  •  佛祖请我去吃肉
    2020-11-30 04:50

    This error is also due to if the following is NOT true:

    By including a module B in A, all the producFlavors that exist in A have to exist in B.


    build.gradle (:app) or (:module-A)

    android {
        flavorDimensions "dimen"
        productFlavors {
            someProduct {
                dimension "dimen"
            }
        }
    }
    
    dependencies {
        api project(path: ':module-B')
    }
    

    So someProduct has to exist in B

    build.gradle (:module-B)

    android {
        flavorDimensions "dimen"
        productFlavors {
            someProduct {
                dimension "dimen"
            }
        }
    }
    

    GL

提交回复
热议问题