Before we start let me explain the assumptions:
I realize it is bad convention to have capitalized package names. In my situation, we are dealing with an 3rd party published android app with capitalized package name, unfortunately app has millions download so republishing is not an option.
I have done extensive research and cannot find solution, the closest SO questions are this and this and this.
The problem :
App was originally developed with eclipse, which can create signed app that has capitalized package name. App must be moved to AS now, which refuses to generate signed apk with capitalized package name. See error below:
Here are relevant parts of my manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="TESTING.CAPITALIZED"
...
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="TESTING.CAPITALIZED.Activity_xxx"
...
Please note I have tried changing manifest activity tagged naming convention to: (but same error)
<activity
android:name=".Activity_xxx"
...
The question:
We need a method/hack in Android Studio to get past this. I don't care how or if it involves magic such as editing dlls, need generate signed apk in AS.
Additional Findings: It appears that in Android Studio, as long as the 1st letter in the package is lower case, we can compile and generate apk. For example, in my example if I refactor my project to zTESTING.CAPITALIZED, I can successfully generate apk. However this doesn't fix my problem because my client's package name is all caps.