Title: AAPT2 error during Android compilation · Issue #1094 · NativeScript/android · GitHub
Open Graph Title: AAPT2 error during Android compilation · Issue #1094 · NativeScript/android
X Title: AAPT2 error during Android compilation · Issue #1094 · NativeScript/android
Description: Please, provide the details below: Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo? Yes Tell us about the problem I get the following error while running tns run android: E...
Open Graph Description: Please, provide the details below: Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo? Yes Tell us about the problem I get the followin...
X Description: Please, provide the details below: Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo? Yes Tell us about the problem I get the followin...
Opengraph URL: https://github.com/NativeScript/android/issues/1094
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AAPT2 error during Android compilation","articleBody":"## Please, provide the details below:\r\n\r\n### Did you verify this is a real problem by searching the [NativeScript Forum](http://forum.nativescript.org) and the [other open issues in this repo](https://github.com/NativeScript/nativescript/issues)?\r\nYes\r\n\r\n### Tell us about the problem\r\nI get the following error while running `tns run android`:\r\n```\r\nError: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':app:mergeDebugResources'.\r\n> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details\r\n```\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n- CLI: 4.1.1\r\n- Cross-platform modules: 4.0.1\r\n- Runtime(s): 4.1.3\r\n\r\n### Did the error happen while the app was being constructed? (buildtime error)\r\nHere is the log of `tns run android --log trace`: \r\n[log.txt](https://github.com/NativeScript/android-runtime/files/2136840/log.txt)\r\n\r\n### Please tell us how to recreate the issue in as much detail as possible.\r\n1. Install NativeScript on a Windows 10 computer with an account name containing non-ASCII characters (in my log, the \"Ú\" character in `C:\\Users\\LÚo\\...` should be an \"é\" instead).\r\n2. Create a new project (even in a path without non-ASCII character) (in my case, it's the NativeScript with Angular Groceries tutorial).\r\n3. Run `tns run android`. At this point, it might or might not work a couple of times until it starts failing with the AAPT2 error and never works again (would it be with LiveSync or by re-running `tns run android`).\r\n\r\nThe only way I found to bypass this error is to set `android.enableAapt2=false` in `platform/android/gradle.properties`. However, if I run `./gradlew`, it tells me this AAPT2 option is deprecated and will soon be removed:\r\n```\r\nPS C:\\NativeScript\\Groceries\\platforms\\android> ./gradlew\r\nStarting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details\r\n\r\n> Configure project :app\r\nWARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.\r\nUse 'android.enableAapt2=true' to remove this warning.\r\nIt will be removed at the end of 2018..\r\n```\r\n\r\nAs far as my research went, it seems that this problem could occur because of the non-ASCII character in my Windows user account (which can't be changed) and I am not the only one: \r\n- [Same problem on another NativeScript repository](https://github.com/NativeScript/nativescript-vscode-extension/issues/189)\r\n- [A clue that this problem could be solved by updating Gradle in tns-android to at least version 3.2.0](https://stackoverflow.com/questions/46988102/errorcom-android-tools-aapt2-aapt2exception-aapt2-error-check-logs-for-detail): my Gradle version is 3.1.2 according to `platform/android/build.gradle`.","author":{"url":"https://github.com/LeoDupont","@type":"Person","name":"LeoDupont"},"datePublished":"2018-06-26T12:53:53Z","url":"https://github.com/NativeScript/android/issues/1094"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:38762d02-c5af-0eb6-40ea-26d29b586f6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 819E:27D3AD:18FA209:1FB1A04:6B014284 |
| html-safe-nonce | 1aa242de6309b1e86481b92eb05ab7210ffa8b6e55579cbf8100b380ed10c131 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTlFOjI3RDNBRDoxOEZBMjA5OjFGQjFBMDQ6NkIwMTQyODQiLCJ2aXNpdG9yX2lkIjoiNDU1Mjk2MDIxOTQxOTg1MzQ0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3b8e98e911ec155db3da67a8f628bb3157c83d48f34af2add27c4312867c67e7 |
| hovercard-subject-tag | issue:335805420 |
| 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/android/1094/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7c1bbd294006310b5192a9df9cf69cd7d444ec0d4c53c75890d5b5aaf5395375/NativeScript/android/issues/1094 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7c1bbd294006310b5192a9df9cf69cd7d444ec0d4c53c75890d5b5aaf5395375/NativeScript/android/issues/1094 |
| og:image:alt | Please, provide the details below: Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo? Yes Tell us about the problem I get the followin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LeoDupont |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/android git https://github.com/NativeScript/android.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 29137950 |
| octolytics-dimension-repository_nwo | NativeScript/android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29137950 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/android |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width