Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AndroidManifest.xml package attribute error with AGP 8.x and newer build tools #10755

Open
Labels
bug-pending-triageReported bug, pending triage to confirm.
@guilpablo

Description

@guilpablo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-pending-triageReported bug, pending triage to confirm.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp