Title: AndroidManifest.xml package attribute error with AGP 8.x and newer build tools · Issue #10755 · NativeScript/NativeScript · GitHub
Open Graph Title: AndroidManifest.xml package attribute error with AGP 8.x and newer build tools · Issue #10755 · NativeScript/NativeScript
X Title: AndroidManifest.xml package attribute error with AGP 8.x and newer build tools · Issue #10755 · NativeScript/NativeScript
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...
Open Graph 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:...
X 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:...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/10755
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AndroidManifest.xml package attribute error with AGP 8.x and newer build tools","articleBody":"### Issue Description\n\n## Environment\n- **NativeScript CLI:** 8.6.5\n- **@nativescript/core:** 8.9.2\n- **@nativescript/android:** 8.9.1\n- **Android SDK:** 30 (also tested with 34)\n- **Build Tools:** 30.0.3 (also tested with 34.0.0)\n- **AGP:** 7.0.4 (forced via before-plugins.gradle)\n- **OS:** macOS 14.3.0\n\n## Issue Description\nThe NativeScript core plugin generates `AndroidManifest.xml` with `package=\"org.nativescript.core\"` attribute in the `\u003cmanifest\u003e` tag, which is no longer supported by newer Android Gradle Plugin versions (AGP 7.2+).\n\n## Error Message\nFAILURE: Build failed with an exception.\nWhat went wrong:\nExecution failed for task ':processReleaseManifest'.\n\u003e A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction\n\u003e Incorrect package=\"org.nativescript.core\" found in source AndroidManifest.xml: /path/to/platforms/tempPlugin/core/src/main/AndroidManifest.xml.\nSetting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.\nRecommendation: remove package=\"org.nativescript.core\" from the source AndroidManifest.xml\n\n### Reproduction\n\n```shell\n## Steps to Reproduce\n1. Create a new NativeScript project or use existing one\n2. Run `ns build android`\n3. Error occurs during plugin build phase\n\n## Attempted Solutions (All Failed)\n1. **Manual patching:** Created scripts to remove `package` attribute after prepare/build\n2. **CLI hooks:** Tried `after-prepare` and `before-build` hooks\n3. **Gradle patching:** Attempted to patch manifest during build process\n4. **Upgrading:** Updated to latest NativeScript versions (8.9.x)\n5. **Downgrading:** Downgraded to SDK 30, build tools 30.0.3, AGP 7.0.4\n6. **Postinstall scripts:** Automated patching after npm install\n\n### Relevant log output (if applicable)\n\n## Root Cause Analysis\nThe issue is that the NativeScript core plugin generates the manifest dynamically during build, and there is no static source file in `node_modules` to patch. The manifest is regenerated after every prepare/build, making all local workarounds ineffective.\n\n## Expected Behavior\nThe NativeScript core plugin should generate `AndroidManifest.xml` without the `package` attribute, or use the `namespace` attribute instead, to be compatible with newer AGP versions.\n\n## Impact\nThis prevents building NativeScript projects with newer Android build tools, forcing developers to use outdated tooling or abandon NativeScript for Android development.\n\n## Additional Notes\n- The manifest is generated at: `platforms/tempPlugin/core/src/main/AndroidManifest.xml`\n- No static source file exists in `node_modules/@nativescript/core/platforms/android/`\n- This affects all NativeScript 8.x projects using newer Android build tools\n```\n\n### Environment\n\n_No response_\n\n### Please accept these terms\n\n- [x] I have searched the [existing issues](https://github.com/NativeScript/NativeScript/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before\n- [x] This is a bug report\n- [x] I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc)","author":{"url":"https://github.com/guilpablo","@type":"Person","name":"guilpablo"},"datePublished":"2025-06-30T02:47:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/10755/NativeScript/issues/10755"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4fba4b2a-7aa9-fb64-fadd-ef41b77ca9f7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF22:D3D20:6329:7E69:696510E1 |
| html-safe-nonce | 8fbfd0d1739c73a916b826175313b4ae7df87c42c24bcbfce7c0e101d681cd86 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjIyOkQzRDIwOjYzMjk6N0U2OTo2OTY1MTBFMSIsInZpc2l0b3JfaWQiOiIyNTI0NzYwMDM2Njc5Njg0MzIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f62477f90b7d5ee60bd730b065a30f7ff778a03054d02d9537e473a25094acb3 |
| hovercard-subject-tag | issue:3186939649 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/10755/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae45966733c81e9e3244d6c6dd12e5cb4a1ef3337c2eb9a4a50d401c66ef4087/NativeScript/NativeScript/issues/10755 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae45966733c81e9e3244d6c6dd12e5cb4a1ef3337c2eb9a4a50d401c66ef4087/NativeScript/NativeScript/issues/10755 |
| og:image:alt | 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:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | guilpablo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 361e28552f448e2f3c84aa6d1d70cc09abfcd936966fa76682f0659b4f5f51d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bb94fc71fe8da8a45636ada2c7618bc2b49b9cbe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width