ZieIony / Carbon

Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.

Home Page:https://androidreclib.wordpress.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execution failed for task ':app:mergeReleaseResources'.

will746 opened this issue · comments

Hello, I have always had this problem with building projects here. Can't find elements that are empty for error.

Error:FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
  Output:  F:\Studio_Workspace\MaiZiHui\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:2061: error: <item> inner element must either be a resource reference or empty.
  
  Command: C:\Users\dell\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-alpha15-4748712-windows.jar\0f51ee076f7bb4c26fce83fe0a3f7c2c\aapt2-3.2.0-alpha15-4748712-windows\aapt2.exe compile --legacy \
          -o \
          F:\Studio_Workspace\MaiZiHui\app\build\intermediates\res\merged\release \
          F:\Studio_Workspace\MaiZiHui\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml
  Daemon:  AAPT2 aapt2-3.2.0-alpha15-4748712-windows Daemon #0
  Output:  C:\Users\dell\.gradle\caches\transforms-1\files-1.1\carbon-0.15.0.1.aar\a4f66429fdb72274a4893ad8da7914d1\res\values\values.xml:618:5-49: AAPT: error: <item> inner element must either be a resource reference or empty.
      
  Command: C:\Users\dell\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-alpha15-4748712-windows.jar\0f51ee076f7bb4c26fce83fe0a3f7c2c\aapt2-3.2.0-alpha15-4748712-windows\aapt2.exe compile --legacy \
          -o \
          F:\Studio_Workspace\MaiZiHui\app\build\intermediates\res\merged\release \
          F:\Studio_Workspace\MaiZiHui\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml
  Daemon:  AAPT2 aapt2-3.2.0-alpha15-4748712-windows Daemon #0

* 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

BUILD FAILED in 8s

You're using an alpha build of Android Studio. In general I'm not interested in unstable tools as it's hard to track the issues and fixing them may break the code for stable tools.

I'll fix your issue as soon as Android Studio 3.2 becomes more stable. Until then I cannot promise anything as I don't want to spend too much time on one version of the alpha.

Ok, I look forward to your solution, thank you~

I think I fixed this issue. See #345 for more details.

I changed the project Gradle configuration to be the same as your example project. the same problem

item name="carbon_input" type="id" 1

Android resource compilation failed
Output: F:\Studio_Workspace\MaiZiHui\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:2061: error: inner element must either be a resource reference or empty.

Command: C:\Users\dell.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-alpha18-4804415-windows.jar\ac72cb83b22ee6ca54b0f1179951c62d\aapt2-3.2.0-alpha18-4804415-windows\aapt2.exe compile --legacy
-o
F:\Studio_Workspace\MaiZiHui\app\build\intermediates\res\merged\release
F:\Studio_Workspace\MaiZiHui\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml
Daemon: AAPT2 aapt2-3.2.0-alpha18-4804415-windows Daemon #

This line is no longer present in the code. Please make sure that you're using the most recent version (not the official release, but the most recent commit) and the build is clean. If the problem persists, please prepare a smallest working example of your issue and post it on github, so I could try to work on your specific case.

It seems that the official version I should use is not the latest version. Because I imported the latest version as a library without this problem.

Could you please be more specific? The version I had in mind was 69f2ba5. This commit should work fine on 3.2.0-alpha18. It's not released, because it's an alpha.

I previously added dependencies through gradle, but adding items is not up-to-date. However, downloading Carbon's source code via github, as a dependency library, has no problem, and the problem that the item attribute is empty has been fixed.

Good, then I'm closing this issue. I will prepare a release as soon as Android Studio and related tools get RC status.