1.找不到与给定名称匹配的资源(在'padding'处,值为'@ dimen / default_gap')。
2.任务执行失败':app:processDebugResources'。
com.android.ide.common.internal.LoggedErrorException:无法运行命令: C:\ Users \ bujima \ AppData \ Local \ Android \ android-studio \ sdk \ build-tools \ 19.0.1 \ aapt.exe package -f --no-crunch -IC:\ Users \ bujima \ AppData \ Local \ Android \ android-studio \ sdk \ platforms \ android-19 \ android.jar -MC:\ Users \ bujima \ AndroidStudioProjects \ Musicplayer2 \ app \ build \ manifests \ debug \ AndroidManifest.xml -SC:\ Users \ bujima \ AndroidStudioProjects \ Musicplayer2 \ app \ build \ res \ all \ debug -AC:\ Users \ bujima \ AndroidStudioProjects \ Musicplayer2 \ app \ build \ assets \ debug -m -JC:\ Users \ bujima \ AndroidStudioProjects \ Musicplayer2 \ app \ build \ source \ r \ debug -FC:\ Users \ bujima \ AndroidStudioProjects \ Musicplayer2 \ app \ build \ libs \ app-debug.ap_ --debug-mode --custom-package edu.asu.ecs.tel 错误代码: 1 输出: C:\ Users \ bujima \ AndroidStudioProjects \ Musicplayer2 \ app \ build \ res \ all \ debug \ layout \ fragment_setting.xml:8:错误:错误:找不到与给定名称匹配的资源('padding'with value'@扪/ default_gap')。
答案 0 :(得分:1)
您无法在其中定义任何没有值的维度。
这就是dimens.xml
应该是这样的
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="default_gap" >your_value_here_in_dp</dimen>
</resources>