I've been using Android Studio perfectly well for a long time now but when I tried using CardView
in my layout file.
Information:Gradle tasks [:app:assembleDebug]
/Users/professori/.gradle/caches/transforms-1/files-1.1/cardview-v7-25.0.0.aar/1cf3ea204bf2d379f4a71d608f48a715/res/values/values.xml
Error:(18, 5) error: expected color reference but got (raw string) #000t.
/Users/professori/Projects/house/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml
Error:(2146) expected color reference but got (raw string) #000t.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED in 19s
Information:7 errors
Information:0 warnings
Information:See complete output in console
I am using buildToolsVersion 27.0.1
and v26.1.0
of the respective support libraries. My gradle
version is 3.0.1.
I have tried cleaning the project multiple times and even restarting Android Studio but it hasn't helped. Some StackOverflow answers suggest disabling aapt2 in gradle.properties
but that just brings some more problems I'd rather not get into.
Is there a permanent way of getting rid of this problem? It's now happened twice in 2 separate projects I'm working on.