AAPT (Android Asset Packaging Tool) errors can arise from a broad range of issues. Typically these errors are related to an old or misconfigured plugin.
This issue has emerged consistently in several plugins. The plugins known to be affected are:
- phonegap-plugin-barcodescanner - Fix: update to latest (7.1.1+)
- cordova-plugin-mauron85-background-geolocation - Fix: update to latest (2.3.5+)
- cordova-plugin-file-opener2 - Fix: see plugin repo
- cordova-plugin-local-notifications - Fix: see plugin repo
Build Log Examples
ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex
Error: /usr/src/app/platforms/android/gradlew: Command failed with exit code 1 Error output: /home/gitlab-runner/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/a5d232484ca4c3bf93915e42e3a0fdca/res/values/values.xml:20:5-70:
AAPT: error: resource android:attr/fontVariationSettings not found. /home/gitlab-runner/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/a5d232484ca4c3bf93915e42e3a0fdca/res/values/values.xml:20:5-70:
AAPT: error: resource android:attr/ttcIndex not found. /usr/src/app/platforms/android/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:88:
error: resource android:attr/fontVariationSettings not found. /usr/src/app/platforms/android/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:88:
error: resource android:attr/ttcIndex not found. error: failed linking references.
Execution failed for task ':processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
at ChildProcess.whenDone (/usr/src/app/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Comments
0 comments
Article is closed for comments.