android - 布局问题?
问题描述
因此,当我更改所有 imageView ID 时发生错误。我完全不知道如何解决这个错误。我应该重新开始吗?错误是
-错误:(83)在包'android'中找不到属性'layout_scaleType'的资源标识符
-错误:(126)在包'android'中找不到属性'layout_scalelType'的资源标识符
-错误:(128, 39) 不允许使用字符串类型(在“layout_width”处,值为“match_constraint”)。
-错误:(129, 40) 不允许使用字符串类型(在“layout_height”处,值为“match_constraint”)。
- 错误:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:使用参数执行进程/Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt时出错{package -f --no-crunch -I /Users/jfenriqu/Library/Android/sdk/platforms/android-27/android.jar -M /Volumes/TEALSTICK/CapstoneV5/app/build/intermediates/manifests/full/debug/ AndroidManifest.xml -S /Volumes/TEALSTICK/CapstoneV5/app/build/intermediates/res/merged/debug -m -J /Volumes/TEALSTICK/CapstoneV5/app/build/generated/source/r/debug -F /Volumes/ TEALSTICK/CapstoneV5/app/build/intermediates/res/debug/resources-debug.ap_ --custom-package com.example.jfenriqu.capstonev5 -0 apk --output-text-symbols /Volumes/TEALSTICK/CapstoneV5/app/构建/中间体/符号/调试 --no-version-vectors}
- 错误:com.android.ide.common.process.ProcessException:执行进程时出错 /Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt 带有参数 {package -f --no-crunch -我 /Users/jfenriqu/Library/Android/sdk/platforms/android-27/android.jar -M /Volumes/TEALSTICK/CapstoneV5/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /Volumes/ TEALSTICK/CapstoneV5/app/build/intermediates/res/merged/debug -m -J /Volumes/TEALSTICK/CapstoneV5/app/build/generated/source/r/debug -F /Volumes/TEALSTICK/CapstoneV5/app/build/中间体/res/debug/resources-debug.ap_ --custom-package com.example.jfenriqu.capstonev5 -0 apk --output-text-symbols /Volumes/TEALSTICK/CapstoneV5/app/build/intermediates/symbols/debug - -无版本向量}
错误:org.gradle.process.internal.ExecException:进程'command'/Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt''以非零退出值1完成
<ScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/zeldaView" android:layout_width="0dp" android:layout_height="0dp" android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/gumballView" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/mortalView" app:srcCompat="@drawable/zelda" /> <ImageView android:id="@+id/smashView" android:layout_width="0dp" android:layout_height="149dp" android:scaleType="fitXY" app:layout_constraintEnd_toStartOf="@+id/gumballView" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/MariokartView" app:srcCompat="@drawable/smash" /> <ImageView android:id="@+id/playstationView" android:layout_width="0dp" android:layout_height="221dp" android:scaleType="fitXY" app:layout_constraintEnd_toStartOf="@+id/dragonballView" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/haloView" app:srcCompat="@drawable/playstation" /> <ImageView android:id="@+id/mortalView" android:layout_width="192dp" android:layout_height="210dp" android:scaleType="fitXY" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/smashView" app:srcCompat="@drawable/mortalkombat" /> <ImageView android:id="@+id/MariokartView" android:layout_width="0dp" android:layout_height="wrap_content" android:scaleType="fitXY" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/falloutView" app:srcCompat="@drawable/mariokart" /> <ImageView android:id="@+id/gumballView" android:layout_width="0dp" android:layout_height="0dp" android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="@+id/mortalView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/mortalView" app:layout_constraintTop_toBottomOf="@+id/smashView" app:srcCompat="@drawable/gumball" /> <ImageView android:id="@+id/imageView13" android:layout_width="0dp" android:layout_height="0dp" android:layout_scaleType="fitXY" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/gameofthrones" /> <ImageView android:id="@+id/imageView12" android:layout_width="0dp" android:layout_height="wrap_content" android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="@+id/zeldaView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/zeldaView" app:layout_constraintTop_toBottomOf="@+id/gumballView" app:srcCompat="@drawable/familyguy" /> <ImageView android:id="@+id/falloutView" android:layout_width="0dp" android:layout_height="171dp" android:scaleType="fitXY" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/darksoulsView" app:srcCompat="@drawable/fallout" /> <ImageView android:id="@+id/darksoulsView" android:layout_width="0dp" android:layout_height="0dp" android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="@+id/playstationView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/playstationView" app:layout_constraintTop_toBottomOf="@+id/dragonballView" app:srcCompat="@drawable/darksouls" /> <ImageView android:id="@+id/crashView" android:layout_width="match_constraint" android:layout_height="match_constraint" android:layout_scalelType="fitXY" android:scaleType="fitXY" app:layout_constraintBottom_toTopOf="@+id/gumballView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/smashView" app:layout_constraintTop_toTopOf="@+id/smashView" app:srcCompat="@drawable/crashbandicoot" /> <ImageView android:id="@+id/dragonballView" android:layout_width="0dp" android:layout_height="0dp" android:scaleType="fitXY" app:layout_constraintBottom_toBottomOf="@+id/haloView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/haloView" app:layout_constraintTop_toTopOf="@+id/haloView" app:srcCompat="@drawable/dragonball" /> <ImageView android:id="@+id/haloView" android:layout_width="192dp" android:layout_height="258dp" android:scaleType="fitXY" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/halo" /> <ImageView android:id="@+id/imageView" android:layout_width="0dp" android:layout_height="0dp" android:scaleType="fitXY" android:src="@drawable/gameofthrones" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/zeldaView" /> </android.support.constraint.ConstraintLayout> </ScrollView>
我很感激任何帮助
解决方案
-错误:(83)在包'android'中找不到属性'layout_scaleType'的资源标识符
-错误:(126)在>包'android'中找不到属性'layout_scalelType'的资源标识符
-错误:(128, 39) 不允许字符串类型(在 'layout_width' 处,值 >'match_constraint')。
-错误:(129, 40) 不允许使用字符串类型(在“layout_height”处,值为“match_constraint”)。
这些都是错别字,将layout_scaleType和layout_scalelType替换为scaleType并将match_constraint替换为0dp
为了在约束布局中创建一个视图 match_constraint,我们使用 0dp
推荐阅读
- performance - jmp 使用表性能(周期(延迟))
- selenium - 如何在 Visual Studio 代码中安装 TestNG
- c - gcov 声称未执行的行 - 如何解决?
- ios - Agora 群组视频通话中的画中画模式
- angular - 视口不显示从 ts 构造函数接收到的数据
- serilog - 如何使用 Serilog outputTemplate 获得格式良好的文件日志(SourceContext 的固定宽度和截断)
- r - R - 数据框非空元素的汇总统计
- alexa-skill - 避免 Alexa Skill 中的话语冲突的最佳做法是什么
- c# - 将 byte[] 转换为图像 C#(ArgumentException 错误)
- r - Shinymanager 通过单击按钮注销