Android资源链接失败:“८dp”与属性layout_marginBottom(attr)尺寸不兼容

时间:2018-11-21 14:19:14

标签: xml

Android资源链接失败 输出:C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:11:错误:“८dp”与layout_marginBottom(attr)维属性不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:11:错误:“८dp”与属性layout_marginEnd(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:11:错误:“८dp”与属性layout_marginLeft(attr)尺寸不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:11:错误:“८dp”与layout_marginRight(attr)属性尺寸不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:11:错误:“८dp”与属性layout_marginStart(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:11:错误:“८dp”与属性layout_marginTop(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:'८dp'与layout_marginBottom(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:“८dp”与属性layout_marginEnd(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:“८dp”与layout_marginLeft(attr)属性尺寸不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:“८dp”与layout_marginRight(attr)属性尺寸不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:“८dp”与layout_marginStart(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:“८dp”与layout_marginTop(attr)属性尺寸不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:34:错误:“३०६dp”与属性layout_width(attr)维度不兼容|枚举[fill_parent = 4294967295,match_parent = 4294967295,wrap_content = 4294967294]。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:61:错误:“८dp”与layout_marginBottom(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:61:错误:“८dp”与属性layout_marginEnd(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:61:错误:“८dp”与layout_marginLeft(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:61:错误:“à¥dp”与属性layout_marginRight(attr)尺寸不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:61:错误:'८dp'与属性layout_marginStart(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:61:错误:“८dp”与layout_marginTop(attr)维度不兼容。 C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ src \ main \ res \ layout \ activity_home.xml:91:错误:“८dp”与layout_marginBottom(attr)维度不兼容。

命令:C:\ Users \ backup.gradle \ caches \ transforms-1 \ files-1.1 \ aapt2-3.2.1-4818971-windows.jar \ 7e5a13a6d0fe9b04a8af7fd06640bd69 \ aapt2-3.2.1-4818971-windows \ aapt2。 exe链接-I \         C:\ Users \ backup \ AppData \ Local \ Android \ Sdk \ platforms \ android-28 \ android.jar \          - 表现\         C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ build \ intermediates \ merged_manifests \ debug \ processDebugManifest \ merged \ AndroidManifest.xml \         -o \         C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ build \ intermediates \ processed_res \ debug \ processDebugResources \ out \ resources-debug.ap_ \         -R \         @C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ build \ intermediates \ incremental \ processDebugResources \ resources-list-for-resources-debug.ap_.txt \         --auto-add-overlay \         --java \         C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ build \ Generated \ not_namespaced_r_class_sources \ debug \ processDebugResources \ r \         --custom-package \         com.example.backup.geuspe \         -0 \         apk \         --output-text-symbols \         C:\ Users \ backup \ AndroidStudioProjects \ GEUSPE \ app \ build \ intermediates \ symbols \ debug \ R.txt \         --no-version-vectors 守护进程:AAPT2 aapt2-3.2.1-4818971-windows守护进程#0

1 个答案:

答案 0 :(得分:0)

查看错误:

activity_home.xml:61: error: '८dp' is incompatible with attribute layout_marginLeft (attr) dimension. 

这意味着在文件activity_home.xml中,您正在使用属性layout_marginLeft并尝试传递值८dp。这不是有效值-可能是类型错误或与系统语言环境有关。尝试使用类似16dp之类的东西。

您可以在此处找到有关属性类型维度的更多信息:https://developer.android.com/guide/topics/resources/more-resources#Dimension