android studio 3.0 Canary 1 : project refresh failed

后端 未结 2 1350
-上瘾入骨i
-上瘾入骨i 2020-12-19 05:24

I tried to load my project in this new Android Studio 3.0 Canary 1. It was running perfectly in my previous Android Studio Version 2.4 preview 7

2条回答
  •  难免孤独
    2020-12-19 05:45

      flavorDimensions "mode"
    productFlavors {
        dev {
            // Assigns this product flavor to the "mode" flavor dimension.
            dimension "mode"
            versionName "1.2"
            versionCode 02
        }
        uat {
            // Assigns this product flavor to the "mode" flavor dimension.
            dimension "mode"
            versionName "1.2"
            versionCode 2
        }
        live {
            // Assigns this product flavor to the "mode" flavor dimension.
            dimension "mode"
            versionName "1.0.1"
            versionCode 01
        }
    }
    

    This is working for me !! In your case you should just make a flavorDimensions variable and assign the value inside the dev block

    flavorDimensions "anyvalue"

    dev.initWith(buildTypes.debug)

        dev {
            dimension "anyvalue"
            applicationIdSuffix ".dev"
        }
    

    This should help .

提交回复
热议问题