In my android project I have a default flavor with a default package name for example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my.default"
android:installLocation="auto">
And in my build.gradle
I've added another flavor with a different package name:
productFlavors {
another {
applicationId 'com.my.another' // This could override the package name defines in the `AndroidManifest.xml`
}
}
After the APK has been installed into my device I want to attach the ndk-gdb
and I get such issues:
- If I install the
com.my.default
everything is fine. - If I install the
com.my.another
, thendk-gdb
fails because it was looking for thecom.my.default
which defines in theAndroidManifest.xml
. - If I change the package name in the
AndroidManifest.xml
tocom.my.another
manually thenndk-gdb
works.
And my question: Is there any way I could use ndk-debug
to debug a flavor produced APK without altering the AndroidManifest.xml
?