Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing .BuildConfig package

Is there a way to dynamically change the package of the generated file .BuildConfig?

I want to use build.gradle file to use the applicationId and change the package name between different builds.

Thanks

like image 373
ranchuk Avatar asked Dec 14 '15 17:12

ranchuk


2 Answers

I had also ApplicationId or Package declared in AndroidManifest.xml

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

Replacing xxx fixed my problem.

like image 152
KlevisGjN Avatar answered Sep 23 '22 13:09

KlevisGjN


The applicationId field just changes the packagename in the manifest. All classes will be still in the original package.

like image 45
rekire Avatar answered Sep 21 '22 13:09

rekire