Summary
Running @trapezedev/configure on an Android project resets every <activity>’s android:name attribute in AndroidManifest.xml to .MainActivity. The transform is only supposed to touch the app’s launcher activity.
Steps to reproduce
- In
config.yaml, set platforms.android.packageName (or leave the default staging value).
- Ensure the project has additional activities (e.g., Facebook’s
com.facebook.FacebookActivity and com.facebook.CustomTabActivity).
- Run
npx @trapezedev/configure <config> android.
- Open
android/app/src/main/AndroidManifest.xml.
Expected behavior
Only the main launcher activity should have its package updated.
Actual behavior
All <activity> nodes get rewritten to android:name=".MainActivity", breaking third-party activities.
Root cause
AndroidProject.setPackageName() calls:
this.manifest.setAttrs('manifest/application/activity', {
'android:name': activityName
});
setAttrs updates every matching node. When the manifest lacks a <manifest package="…"> attribute (common with AGP 8+), activityName stays .MainActivity, so the loop overwrites each activity.
Environment
@trapezedev/configure 7.1.3
- Capacitor/Cordova Android project (AGP 8+ manifest without a
manifest@package attribute)
Suggested fix
Update setPackageName() to target only the main/launcher activity—e.g., select the one with android.intent.action.MAIN or android:name='.MainActivity'—instead of every <activity>.
Summary
Running
@trapezedev/configureon an Android project resets every<activity>’sandroid:nameattribute inAndroidManifest.xmlto.MainActivity. The transform is only supposed to touch the app’s launcher activity.Steps to reproduce
config.yaml, setplatforms.android.packageName(or leave the default staging value).com.facebook.FacebookActivityandcom.facebook.CustomTabActivity).npx @trapezedev/configure <config> android.android/app/src/main/AndroidManifest.xml.Expected behavior
Only the main launcher activity should have its package updated.
Actual behavior
All
<activity>nodes get rewritten toandroid:name=".MainActivity", breaking third-party activities.Root cause
AndroidProject.setPackageName()calls:setAttrsupdates every matching node. When the manifest lacks a<manifest package="…">attribute (common with AGP 8+),activityNamestays.MainActivity, so the loop overwrites each activity.Environment
@trapezedev/configure7.1.3manifest@packageattribute)Suggested fix
Update
setPackageName()to target only the main/launcher activity—e.g., select the one withandroid.intent.action.MAINorandroid:name='.MainActivity'—instead of every<activity>.