flutter 多渠道打包 不同环境不同包名 product flavors flavorDimensions

问题:

All flavors must now belong to a named flavor dimension.

所有口味现在必须属于一个命名的风味维度。

解决参考 如下:

    flavorDimensions('flavorDimensions1', 'flavorDimensions2')
    productFlavors  {
        version1 {
            dimension 'flavorDimensions1'
            applicationId "com.company.version1"
            resValue "string", "app_name", "version1"
            manifestPlaceholders = [CHANNEL_VALUE: "version1"
                                    ,app_icon   : "@mipmap/ic_launcher"]
        }
        version2 {
            dimension 'flavorDimensions2'
            applicationId "com.company.version2"
            resValue "string", "app_name", "version2"
            manifestPlaceholders = [CHANNEL_VALUE: "version2",
                                    app_icon   : "@mipmap/ic_launcher",
                                    JPUSH_PKGNAME : applicationId,
                                    JPUSH_APPKEY : "key", // NOTE: JPush 上注册的包名对应的 Appkey.
                                    JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
            ]
        }
    }

==

问题:

Task 'assembleXXXDebug' not found in root project 'android'.

The android/app/build.gradle file defines product flavors: xiaomi, xiaomitengxun You must specify a --flavor option to select one of them.

flutter 多渠道打包 不同环境不同包名 product flavors flavorDimensions_第1张图片

==

flutter 多渠道打包 不同环境不同包名 product flavors flavorDimensions_第2张图片

--flavor version1

还是一样报错。。

flutter 多渠道打包 不同环境不同包名 product flavors flavorDimensions_第3张图片

待解决..

==

 

你可能感兴趣的:(flutter 多渠道打包 不同环境不同包名 product flavors flavorDimensions)