布局问题?
Layout problems?
所以当我更改所有 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:使用参数 {package -f --no-crunch -I /Users/jfenriqu/Library/Android/sdk/platforms/android-27/android 执行进程 /Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt 时出错.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/build/intermediates/symbols/debug --no-version-vectors}
- 错误:com.android.ide.common.process.ProcessException:使用参数 {package -f --no-crunch -I /Users/jfenriqu/Library/Android/sdk/platforms/android-27/android.jar -M [= 执行进程 /Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt 时出错48=].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/build/intermediates/symbols/debug --no-version-vectors}
错误: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>
感谢任何帮助
-Error:(83) No resource identifier found for attribute 'layout_scaleType' in
package 'android'
-Error:(126) No resource identifier found for attribute 'layout_scalelType' in >package 'android'
-Error:(128, 39) String types not allowed (at 'layout_width' with value >'match_constraint').
-Error:(129, 40) String types not allowed (at 'layout_height' with value 'match_constraint').
这些都是错别字,
将 layout_scaleType 和 layout_scalelType 替换为 scaleType 和 match_constraint 与 0dp
要在约束布局中创建视图 match_constraint,我们使用 0dp
所以当我更改所有 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:使用参数 {package -f --no-crunch -I /Users/jfenriqu/Library/Android/sdk/platforms/android-27/android 执行进程 /Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt 时出错.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/build/intermediates/symbols/debug --no-version-vectors}
- 错误:com.android.ide.common.process.ProcessException:使用参数 {package -f --no-crunch -I /Users/jfenriqu/Library/Android/sdk/platforms/android-27/android.jar -M [= 执行进程 /Users/jfenriqu/Library/Android/sdk/build-tools/26.0.2/aapt 时出错48=].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/build/intermediates/symbols/debug --no-version-vectors}
错误: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>
感谢任何帮助
-Error:(83) No resource identifier found for attribute 'layout_scaleType' in package 'android'
-Error:(126) No resource identifier found for attribute 'layout_scalelType' in >package 'android'
-Error:(128, 39) String types not allowed (at 'layout_width' with value >'match_constraint').
-Error:(129, 40) String types not allowed (at 'layout_height' with value 'match_constraint').
这些都是错别字, 将 layout_scaleType 和 layout_scalelType 替换为 scaleType 和 match_constraint 与 0dp
要在约束布局中创建视图 match_constraint,我们使用 0dp