Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.7k
Description
Issue Description
Environment
- NativeScript CLI: 8.6.5
- @nativescript/core: 8.9.2
- @nativescript/android: 8.9.1
- Android SDK: 30 (also tested with 34)
- Build Tools: 30.0.3 (also tested with 34.0.0)
- AGP: 7.0.4 (forced via before-plugins.gradle)
- OS: macOS 14.3.0
Issue Description
The NativeScript core plugin generatesAndroidManifest.xml
withpackage="org.nativescript.core"
attribute in the<manifest>
tag, which is no longer supported by newer Android Gradle Plugin versions (AGP 7.2+).
Error Message
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processReleaseManifest'.
A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
Incorrect package="org.nativescript.core" found in source AndroidManifest.xml: /path/to/platforms/tempPlugin/core/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
Recommendation: remove package="org.nativescript.core" from the source AndroidManifest.xml
Reproduction
## Steps to Reproduce1. Create a new NativeScript project or use existing one2. Run`ns build android`3. Error occurs during plugin build phase## Attempted Solutions (All Failed)1.**Manual patching:** Created scripts to remove`package` attribute after prepare/build2.**CLI hooks:** Tried`after-prepare` and`before-build` hooks3.**Gradle patching:** Attempted to patch manifest during build process4.**Upgrading:** Updated to latest NativeScript versions (8.9.x)5.**Downgrading:** Downgraded to SDK 30, build tools 30.0.3, AGP 7.0.46.**Postinstall scripts:** Automated patching after npm install### Relevant log output (if applicable)## Root Cause AnalysisThe issue is that the NativeScript core plugin generates the manifest dynamically during build, and there is no staticsource filein`node_modules` to patch. The manifest is regenerated after every prepare/build, making alllocal workarounds ineffective.## Expected BehaviorThe NativeScript core plugin should generate`AndroidManifest.xml` without the`package` attribute, or use the`namespace` attribute instead, to be compatible with newer AGP versions.## ImpactThis prevents building NativeScript projects with newer Android build tools, forcing developers to use outdated tooling or abandon NativeScriptfor Android development.## Additional Notes- The manifest is generated at:`platforms/tempPlugin/core/src/main/AndroidManifest.xml`- No staticsource file existsin`node_modules/@nativescript/core/platforms/android/`- This affects all NativeScript 8.x projects using newer Android build tools
Environment
No response
Please accept these terms
- I have searched theexisting issues as well asStackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project'sCode of Conduct