错误:链接引用失败. ->排队的工作 [英] error: failed linking references. -> QueuedJob
问题描述
我当时正在研究使用Kotlin进行的Android Material Design,直到尝试使用android.support.design.widget.FloatingActionButton之前,一切都进行得很好.
I was studying the Android Material Design using Kotlin and everything was going fine until I tried to use the android.support.design.widget.FloatingActionButton.
当我重建项目时,我收到以下错误消息:
When I rebuild the project I got the error message below:
Information:Gradle tasks [clean, :app:assembleDebug]
C:\Users\qin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\3d5ddc383685b19d22429a29e09f2aeb\res\values\values.xml
Error:(1419, 5) error: style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found.
Error:(1525, 5) error: style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found.
.....\CursoMaterialDesign\ThemeDesign\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(1843) style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found.
Error:(1953) style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found.
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 15s
Information:9 errors
Information:0 warnings
Information:See complete output in console
我将源文件保存在 GitHub 上,我的环境是:
I saved the source files on GitHub and my environment is:
- WINDOWS 10 10.03.0.1(64位)
- ANDROID STUDIO Android Studio 3.0.1-构建#AI-171.4443003
- JRE:1.8.0_152-release-915-b01 amd64
- JVM:JetBrains s.r.o的OpenJDK 64位服务器VM
我尝试过:
- FILE-> INVALIDATE CACHE/RESTART命令,但没有任何更改.
- 我在终端上执行了 gradlew cleanBuildCache ,但无法从'9.0.1'(?)确定Java版本,如下所示.
- The FILE->INVALIDATE CACHE/RESTART command, but nothing changed.
- I executed the gradlew cleanBuildCache on the terminal, but it could not determine java version from '9.0.1' (?) as shown below.
gradlew cleanBuildCache --stacktrace --debug
14:05:14.966 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: C:\Users\qin\.gradle\native
14:05:15.038 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:05:15.039 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:05:15.039 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:05:15.039 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
14:05:15.042 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not determine java version from '9.0.1'.
14:05:15.042 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:05:15.042 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
14:05:15.043 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] java.lang.IllegalArgumentException: Could not determine java version from '9.0.1'.
14:05:15.043 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:72)
14:05:15.043 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.JavaVersion.current(JavaVersion.java:82)
14:05:15.043 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(UnsupportedJavaRuntimeEx
ception.java:29)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:32)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:
253)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:
182)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:05:15.044 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:05:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:05:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
推荐答案
您引用的属性"textColor"应为"android:textColor".
在app/src/main/res/values/styles.xml中,替换第13行和第17行:
You were referencing an attribute "textColor", when it should be "android:textColor".
In app/src/main/res/values/styles.xml replace in line 13 and line 17:
<item name="textColor">...</item> -> <item name="android:textColor">...</item>
如何:AAPT的错误说明如下:
The how: the error from AAPT stated the following:
错误:找不到样式属性'attr/textColor(aka br.com.conseng.themedesign:attr/textColor)'.
error: style attribute 'attr/textColor (aka br.com.conseng.themedesign:attr/textColor)' not found.
它指出您(或您的库)正在使用某个无法识别的属性.我在您的存储库中搜索了"textColor",并提出了两个名称为"textColor"的属性.广泛使用的属性是"android:textColor",您没有在自己的任何地方定义属性"textColor",因此您好像缺少了"android:"前缀.
It points out that you (or your libraries) are using an attribute somewhere that is not recognized. I searched for "textColor" in your repository and came up with the two attributes with the name "textColor". The widely used attribute is "android:textColor" and you didn't define the attribute "textColor" anywhere yourself, so it looked like you were missing the "android:" prefix.
这篇关于错误:链接引用失败. ->排队的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!