我正在使用Kotlin研究Android Material Design,直到尝试使用androID.support.design.Widget.floatingActionbutton为止一切都进行得很好.
重建项目时,出现以下错误消息:
information:Gradle tasks [clean, :app:assembleDeBUG]C:\Users\qin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aard5ddc383685b19d22429a29e09f2aeb\res\values\values.xmlError:(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.xmlError:(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 detailsError:java.util.concurrent.ExecutionException: com.androID.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for detailsError:com.androID.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for detailsError:Execution Failed for task ':app:processDeBUGResources'.> Failed to execute aaptinformation:BUILD Failed in 15sinformation:9 errorsinformation:0 warningsinformation:See complete output in console
我将源文件保存在GitHub上,我的环境是:
> 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版本,如下所示.
gradlew cleanBuildCache --stacktrace --deBUG14:05:14.966 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: C:\Users\qin\.gradle\native14: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(UnsupportedJavaRuntimeException.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.java: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.java: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行:
<item name="textcolor">...</item> -> <item name="androID:textcolor">...</item>
方法:AAPT的错误说明如下:
error: style attribute ‘attr/textcolor (aka br.com.conseng.themedesign:attr/textcolor)’ not found.
它指出您(或您的库)正在使用某个无法识别的属性.我在您的存储库中搜索了“ textcolor”,并提出了两个名称为“ textcolor”的属性.广泛使用的属性是“ androID:textcolor”,您没有在自己的任何位置定义属性“ textcolor”,因此您似乎缺少了“ androID:”前缀.
总结以上是内存溢出为你收集整理的android-错误:链接引用失败. ->排队工作全部内容,希望文章能够帮你解决android-错误:链接引用失败. ->排队工作所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)