Closed fbertini closed 1 year ago
Hello,
I have found a solution for this issue. It was my mistake and I would suggest to add this to the documentation if missing. Basically we need to add xmlns:tools to the manifest section of AndroidManifest.xml via config.xml configuration.
Adding the following XML code within the <platform name="android">
section, solved the issue:
<custom-preference name="android-manifest/@xmlns:tools" value="http://schemas.android.com/tools" />
This issue can be closed. Thank you.
Bug report
Current behavior:
I am using ionic cordova plugin + cordova-custom-config. Below you can find the part of the config.xml that is producing the error:
Running the following command produce an unwanted result:
ionic cordova build android --prod --release --aot
Expected behavior: The following XML is expected:
Steps to reproduce:
ionic cordova platform add android
ionic cordova build android --prod --release --aot
Screenshots N/A
Environment information
11.1.0
android 10.1.2
22H2 (build SO 19045.2728)
Android build issue:
10.18.1
7.0
7.1.1
33
Related code: N/A
Console output
console output
```text Subproject Path: CordovaLib Subproject Path: app > Task :app:createReleaseCompatibleScreenManifests FAILED FAILURE: Build failed with an exception. Execution failed for task ':app:createReleaseCompatibleScreenManifests'. > Error while evaluating property 'variantOutputs.$0.versionName' of task ':app:createReleaseCompatibleScreenManifests' > org.xml.sax.SAXParseException; systemId: file:/C:/Users/user/Documents/workspaces/myapp/myapp-app/platforms/android/app/src/main/AndroidManifest.xml; lineNumber: 13; columnNumber: 99; The prefix "tools" for attribute "tools:node" associated with an element type "uses-permission" is not bound. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 1s 8 actionable tasks: 3 executed, 5 up-to-date Command failed with exit code 1: C:\Users\user\Documents\workspaces\myapp\myapp-app\platforms\android\gradlew :app:bundleRelease -b C:\Users\user\Documents\workspaces\myapp\myapp-app\platforms\android\build.gradle [ERROR] An error occurred while running subprocess cordova. ```**Other information:** N/A