我注意到从前一天停止工作的地方启动android后,我的所有drawables文件都无法链接:
Android resource linking failed
Output: C:\Users\Access\AndroidStudioProjects\Devotion\app\src\main\res\layout\activity_main.xml:24: error: resource drawable/slide (aka com.accessng.devotion:drawable/slide) not found.
C:\Users\Access\AndroidStudioProjects\Devotion\app\src\main\res\layout\activity_read.xml:31: error: resource drawable/image (aka com.accessng.devotion:drawable/image) not found.
C:\Users\Access\AndroidStudioProjects\Devotion\app\src\main\res\layout\main_menu_item.xml:15: error: resource drawable/menu_bg (aka com.accessng.devotion:drawable/menu_bg) not found.
C:\Users\Access\AndroidStudioProjects\Devotion\app\src\main\res\layout\read_setting_bottom_sheet.xml:94: error: resource drawable/ic_night (aka com.accessng.devotion:drawable/ic_night) not found.
error: failed linking file resources.
Command: C:\Users\Access\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\b88544288ad13e2c86f99a94f775848a\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Access\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\Access\AndroidStudioProjects\Devotion\app\build\intermediates\instant_run_merged_manifests\debug\processDebugManifest\instant-run\AndroidManifest.xml\
-o\
C:\Users\Access\AndroidStudioProjects\Devotion\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@C:\Users\Access\AndroidStudioProjects\Devotion\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\Access\AndroidStudioProjects\Devotion\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.accessng.devotion\
-0\
apk\
--preferred-density\
xhdpi\
--output-text-symbols\
C:\Users\Access\AndroidStudioProjects\Devotion\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
答案 0 :(得分:2)
感谢所有注释,我在drawable中添加了一个矢量资产文件,例如IDE在添加文件时崩溃,而xml的内容为空。一旦我删除了文件,一切都很好。但是错误日志从未提及该文件