android - Android studio 3.2,Android SDK Tools 26.0.2 错误:Android 资源链接失败
问题描述
嘿,伙计们,我的 android studio 有问题,错误是:
`Android资源链接失败输出:
/Users/omar_sameh/Desktop/CarzyOS/app/src/main/res/layout/activity_main.xml:9: error: 'RecyclerView' is incompatible with attribute id (attr) reference.
error: failed linking file resources.
Command: /Users/omar_sameh/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-osx.jar/7761ac785c77afbee7829c87129e0c02/aapt2-3.2.0-4818971-osx/aapt2 link -I\
/Users/omar_sameh/Library/Android/sdk/platforms/android-27/android.jar\
--manifest\
/Users/omar_sameh/Desktop/CarzyOS/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/Users/omar_sameh/Desktop/CarzyOS/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
@/Users/omar_sameh/Desktop/CarzyOS/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/Users/omar_sameh/Desktop/CarzyOS/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.example.omar_sameh.carzyos\
-0\
apk\
--output-text-symbols\
/Users/omar_sameh/Desktop/CarzyOS/app/build/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-osx Daemon #0
`
有什么建议么 ?
解决方案
根据您的 xml 文件, attr 元素无效
activity_main.xml:9: error: 'RecyclerView' is incompatible with attribute id (attr) reference. error: failed linking file resources.
推荐阅读
- google-cloud-platform - 来自 Google Cloud Platform VM 的 Youtube API 错误“已超出未验证使用的每日限制。继续使用需要注册”
- reactjs - reactJs 安全存储
- logic - 说任何带有“Softmax 函数”一词的问题都是重复的副本是否正确?
- android - Appium Espresso 后门
- postgresql - 如何从解释中获取 Postgresql 总成本时间
- ios - 删除并重新安装应用后,iOS 钥匙串数据会保留吗?
- ruby-on-rails - Rails 范围使用实例方法
- pandas - 多索引列上的熊猫,fillna
- python - 如何在我的烧瓶网络应用程序中实现动态 select2 字段?
- node.js - 如何将两个 GET 请求/数据库合并为 1?