Open zhoujia456888 opened 4 years ago
前提条件:项目中配置了多渠道(比如配置官方渠道和应用宝渠道)、dubug和release版本。打包会打4个包。 出错的地方:在打包的时候所有的渠道全部选择同时打包(如下图1),打包完成之后bus.json里面的内容会重复多行,然后bus接收的时候会收到多条消息
图1
图2这是多个渠道一起打包之后的bus.json
图3 这是单个渠道打包的bus.json
这个问题可能是Gradle打包引起的,可能不是个bug。暂时解决方案是多渠道打包时一个一个分开打包
附上Android Studio 和gradle信息 distributions/gradle-6.1.1-all.zip com.android.tools.build:gradle:4.0.0 org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0
Android Studio 4.0.1 Build #AI-193.6911.18.40.6626763, built on June 25, 2020 Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.15.6 GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Registry: ide.new.welcome.screen.force=true Non-Bundled Plugins: org.jetbrains.kotlin, cn.yiiguxing.plugin.translate, com.google.services.firebase, com.wakatime.intellij.plugin, net.vektah.codeglance, wu.seal.tool.jsontokotlin
好的,我有空会看修复下的
修复了吗 我也出现同样的问题
描述 Bug
前提条件:项目中配置了多渠道(比如配置官方渠道和应用宝渠道)、dubug和release版本。打包会打4个包。 出错的地方:在打包的时候所有的渠道全部选择同时打包(如下图1),打包完成之后bus.json里面的内容会重复多行,然后bus接收的时候会收到多条消息
截图
图1
图2这是多个渠道一起打包之后的bus.json
图3 这是单个渠道打包的bus.json
这个问题可能是Gradle打包引起的,可能不是个bug。暂时解决方案是多渠道打包时一个一个分开打包
附上Android Studio 和gradle信息 distributions/gradle-6.1.1-all.zip com.android.tools.build:gradle:4.0.0 org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0
Android Studio 4.0.1 Build #AI-193.6911.18.40.6626763, built on June 25, 2020 Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.15.6 GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Registry: ide.new.welcome.screen.force=true Non-Bundled Plugins: org.jetbrains.kotlin, cn.yiiguxing.plugin.translate, com.google.services.firebase, com.wakatime.intellij.plugin, net.vektah.codeglance, wu.seal.tool.jsontokotlin