I have an app which I'm trying to compile with my original package name, very similar to this: com.mypackage.name_.app'
The app compiled successfully until now, which I migrated to the newest versions of Gradle and I'm compiling with API 24. Previously I used old versions of Gradle and API 23.
Now, when trying to compile that app, I'm getting this error:
APT: error: attribute 'package' in tag is not a valid Java package name: 'com.mypackage.name_.app'.
.
.
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
.
.
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
I found here that AAPT2 doesn't allow underscore in the end of a portion of your package name: All of my android studio projects and all new ones give me errors coming from the debug android manifest file
But then, what happens if you previously compiled and released into Google Play an app with a underscore in the end of a part of your package name? For example I found this example: https://play.google.com/store/apps/details?id=com.mobincube.tarifas_taxi_.sc_35K1XV
It is released into Google Play with this package name portion ".tarifas_taxi_.
"
How can that developer (and me) compile now our apps with underscore in that position?