在我的项目中添加了 recycler-view 依赖后出现了很多错误
Many errors appeared after i added a recycler-view dependency in my project
我的应用程序运行良好并编译,直到我添加
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.aar5a076f8084ee34b277fdfdb97836e0\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 然后我收到下一个警告:
请帮我弄清楚
尝试将 com.android.support:recyclerview-v7:28.0.0-alpha1
更改为 com.android.support:recyclerview-v7:25.3.1
。
然后看看问题
我的应用程序运行良好并编译,直到我添加
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.aar5a076f8084ee34b277fdfdb97836e0\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 然后我收到下一个警告:
请帮我弄清楚
尝试将 com.android.support:recyclerview-v7:28.0.0-alpha1
更改为 com.android.support:recyclerview-v7:25.3.1
。
然后看看