Symptoms
In Workspace One UEM console, when you try to add an internal Android application in the form of .apk file to Managed Google Play using iFrame method you get an error stating “Upload a new apk file with a different package name”.
Cause
This error is most likely due to the duplicate app with the same application ID in the Public Google Play. Make sure to change the package name in your manifest file to something unique.
Resolution
Even if you’re trying to deploy your internal application through Managed Google Play, make sure you’re using a unique aplicationId that do not exist in the Public version of this application store. Modify this code in your build.gradle file:
android {
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
...
}
If you plan to deployt your app through both versions of Google Play, an alternate method is to use application variants for versions available through public and managed Google Play:
android {
defaultConfig {
applicationId "com.example.myapp" }
productFlavors {
public {
applicationIdSuffix ".public" }
internal {
applicationIdSuffix ".internal"
}
}
}
Details on versioning of Android apps can be found here:
https://developer.android.com/studio/build/application-id