gpt4 book ai didi

java - Android Gradle 构建失败

转载 作者:行者123 更新时间:2023-11-29 19:05:17 26 4
gpt4 key购买 nike

我一直在使用 android studio,在 gradle 构建完成后出现 17 条错误消息。我总是尝试重建,但仍然出现同样的错误。

成绩控制台中的消息:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
C:\Users\admin\AndroidStudioProjects\Exam1\app\src\main\res\layout\activity_main.xml
Error:error: '67' is incompatible with attribute android:layout_height (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:error: '176' is incompatible with attribute android:layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:error: '67' is incompatible with attribute android:layout_height (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:error: '176' is incompatible with attribute android:layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:error: '67' is incompatible with attribute android:layout_height (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:error: '176' is incompatible with attribute android:layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:'67' is incompatible with attribute android:layout_height (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:'176' is incompatible with attribute android:layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:'67' is incompatible with attribute android:layout_height (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:'176' is incompatible with attribute android:layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:'67' is incompatible with attribute android:layout_height (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:'176' is incompatible with attribute android:layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'. > Failed to execute aapt

Information:BUILD FAILED in 1m 11s
Information:17 errors
Information:0 warnings`
Information:See complete output in console

最佳答案

看起来您没有使用尺寸单位。您应该使用“dp”或其他常用单位。
更多信息:https://developer.android.com/guide/topics/resources/more-resources.html#Dimension

关于java - Android Gradle 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47482546/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com