This is a common issue when trying to build a custom APK for distribution, especially on the Google Play Store where a unique package name is mandatory. Changing the packageName
in application-descriptor.xml
is only one part of the process. You also need to ensure the package name is updated across the entire project structure.
Here's a basic solution to fix it:
1️⃣ Update the package
attribute in the AndroidManifest.xml
.
2️⃣ Refactor the package name in your Java/Kotlin source directories - right-click the package folder > Refactor > Rename.
3️⃣ Update the build.gradle
file (applicationId "com.xxxxx.maximoanywhere.workexecution"
).
4️⃣ Clean and rebuild your project to apply the changes.
This process creates a fully unique APK with a custom package name ready for upload to the Play Store.
Interestingly, apps like Instander Clone use this approach to allow users to install their modded app alongside the official Instagram app. The clone version simply has a different package name, which prevents any conflict between both apps on the same device.
Make sure to check every config file and folder structure during this process - that's where the package name hides the most!
------------------------------
Chayaon z
------------------------------
Original Message:
Sent: Mon March 08, 2021 02:35 PM
From: mikael simonsson
Subject: How to build a custom apk with a own packagename?
To be able to upload a custom android apk to google customer store a unic name needs to be set on the application.
I have tried to change the packageName in application-descriptor.xml to below but after build the application is still using default packagename.
<packageName>com.xxxxx.maximoanywhere.workexecution</packageName>
How can I build a custom apk with a custom packageName?
------------------------------
mikael simonsson
Architect
IBM
Stockholm
------------------------------
#Maximo
#MaximoAnywhere
#AssetandFacilitiesManagement