更改.BuildConfig包

问题描述 投票:2回答:2

有没有办法动态更改生成的文件包.BuildConfig?

我想使用build.gradle文件来使用applicationId并在不同版本之间更改包名称。

谢谢

android gradle build.gradle android-build
2个回答
2
投票

applicationId字段只是更改清单中的包名称。所有课程仍将保留在原始课程中。


1
投票

我还在AndroidManifest.cml中声明了ApplicationId或Package

<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="xxx">

更换xxx解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.