美文网首页
[原创]fluter之个推的插件bug解决

[原创]fluter之个推的插件bug解决

作者: 吉凶以情迁 | 来源:发表于2021-12-23 23:19 被阅读0次

在android app build.gradle中


apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

下面加上

 def push_manifestPlaceholders = [
                LOZN_DEBUG:"true",
                GETUI_APP_ID    : "lozn",
                GETUI_APP_KEY   : "lozn",
                GETUI_APP_SECRET: "",
                // 下面是多厂商配置,如需要开通使用请联系技术支持
                // 如果不需要使用,预留空字段即可
                XIAOMI_APP_ID   : "",
                XIAOMI_APP_KEY  : "",
                MEIZU_APP_ID    : "",
                MEIZU_APP_KEY   : "",
                HUAWEI_APP_ID   : "",
                OPPO_APP_KEY   : "",
                OPPO_APP_SECRET  : "",
                VIVO_APP_ID   : "",
                VIVO_APP_KEY  : ""
        ]
 /* project.android {
                defaultConfig {
                    // Setting to android.app.Application is the same as omitting the attribute.
                    manifestPlaceholders =  project.android.defaultConfig.manifestPlaceholders+push_manifestPlaceholders;
                }
            } */
 project.android.defaultConfig.manifestPlaceholders= project.android.defaultConfig.manifestPlaceholders+push_manifestPlaceholders
print("current_manifestplaceholder:"+project.android.defaultConfig.manifestPlaceholders);

如果按普通的继承方法,会提示ApplicationName 不存在问题,原因是这样写会把flutter.gradle里面定义的给替换没了.

相关文章

网友评论

      本文标题:[原创]fluter之个推的插件bug解决

      本文链接:https://www.haomeiwen.com/subject/llgkqrtx.html