Tencent / QMUI_Android

提高 Android UI 开发效率的 UI 库
http://qmuiteam.com/android
Other
14.42k stars 2.67k forks source link

AAPT: error: resource style/QMUI.Dialog_MenuItem (aka com.wandi.wandi:style/QMUI.Dialog_MenuItem) not found. error: failed linking references. #847

Open sheisai opened 4 years ago

sheisai commented 4 years ago

运行环境

具体问题描述

Android Studio构建缺少资源 AAPT: error: resource style/QMUI.Dialog_MenuItem (aka com.wandi.wandi:style/QMUI.Dialog_MenuItem) not found. error: failed linking references.

问题截图

image

Layout Inspector 文件(如何获取)

异常日志(堆栈)

Task :app:process_testDebugResources in app Starting Caching disabled for task ':app:process_testDebugResources' because: Build cache is disabled Task ':app:process_testDebugResources' is not up-to-date because: Task has failed previously. All input files are considered out-of-date for incremental task ':app:process_testDebugResources'. Unable do incremental execution: full task run Transforming artifact aapt2-osx.jar (com.android.tools.build:aapt2:3.5.1-5435860) with Aapt2Extractor Caching disabled for Aapt2Extractor: /Users/antonio/.gradle/caches/modules-2/files-2.1/com.android.tools.build/aapt2/3.5.1-5435860/1a82cd6725bc0429e91dc744f6dad8f93d8b2f43/aapt2-3.5.1-5435860-osx.jar because: Build cache is disabled Skipping Aapt2Extractor: /Users/antonio/.gradle/caches/modules-2/files-2.1/com.android.tools.build/aapt2/3.5.1-5435860/1a82cd6725bc0429e91dc744f6dad8f93d8b2f43/aapt2-3.5.1-5435860-osx.jar as it is up-to-date. AAPT2 aapt2-3.5.1-5435860-osx Daemon #0: starting Android resource linking failed: process = AAPT2 aapt2-3.5.1-5435860-osx Daemon #0: command = /Users/antonio/.gradle/caches/transforms-2/files-2.1/fe8d3845b6ce2faff237eba52af799ae/aapt2-3.5.1-5435860-osx/aapt2 link -I\ /Users/antonio/Library/Android/sdk/platforms/android-29/android.jar\ --manifest\ /Users/antonio/androidpro/WanDi/app/build/intermediates/merged_manifests/_testDebug/AndroidManifest.xml\ -o\ /Users/antonio/androidpro/WanDi/app/build/intermediates/processed_res/_testDebug/process_testDebugResources/out/resources-testDebug.ap\ -R\ @/Users/antonio/androidpro/WanDi/app/build/intermediates/incremental/process_testDebugResources/resources-list-for-resources-testDebug.ap.txt\ --auto-add-overlay\ --java\ /Users/antonio/androidpro/WanDi/app/build/generated/not_namespaced_r_class_sources/_testDebug/r\ --custom-package\ com.wandi.wandi\ -0\ apk\ --output-text-symbols\ /Users/antonio/androidpro/WanDi/app/build/intermediates/symbols/_test/debug/R.txt\ --no-version-vectors Task :app:process_testDebugResources in app Finished :app:process_testDebugResources (Thread[Execution worker for ':' Thread 3,5,main]) completed. Took 0.981 secs. AAPT2 aapt2-3.5.1-5435860-osx Daemon #0: shutdown

FAILURE: Build failed with an exception.

cgspine commented 4 years ago

搜索你的项目中用到 QMUI.Dialog_MenuItem 的地方, 改成 QMUI.Dialog.MenuItem,谢谢,这是之前版本的一个命名错误。

sheisai commented 4 years ago

@cgspine 感谢,我遇到了另外一个问题,QMUITabBuilder似乎没有办法改变tab的宽度,我想设置它的宽度,如果可以的话

cgspine commented 4 years ago

目前只有两种 mode 的选择,在scroll 模式下确实只能设置两个tab 间的间距,有何种场景是需要单独改宽度?

lindexter commented 4 years ago

nice, it help me