0

我的应用程序运行良好并编译,直到我添加

com.android.support:recyclerview-v7:28.0.0-alpha1在我的项目中。

这是我的错误:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
C:\Users\Smith\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.3.1.aar\455a076f8084ee34b277fdfdb97836e0\res\values\values.xml
Error:(203, 5) error: resource android:attr/fontStyle not found.
Error:(203, 5) error: resource android:attr/font not found.
Error:(203, 5) error: resource android:attr/fontWeight not found.
Error:(203, 5) error: resource android:attr/fontVariationSettings not found.
Error:(203, 5) error: resource android:attr/ttcIndex not found.
C:\Users\Smith\AndroidStudioProjects\DontSleepManager\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(314) resource android:attr/fontStyle not found.
Error:(314) resource android:attr/font not found.
Error:(314) resource android:attr/fontWeight not found.
Error:(314) resource android:attr/fontVariationSettings not found.
Error:(314) resource android:attr/ttcIndex 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 29s
Information:15 errors
Information:0 warnings
Information:See complete output in console

在此处输入图像描述

如果我添加该行

android.enableAapt2=false

在 gradle-properties 然后我得到下一个警告:

在此处输入图像描述

请帮我弄清楚

4

1 回答 1

1

尝试更改com.android.support:recyclerview-v7:28.0.0-alpha1com.android.support:recyclerview-v7:25.3.1.

看看这个问题

于 2018-04-12T13:51:39.837 回答