#概要
Cloud VisionAPIをAndroidstudioで使用するためにソースプログラムを実装したのですが
その後エラーが多発するうちに、難儀なエラーに出くわしてしましました。
もう僕自身、タイトルの通りお手上げです。
知識者の方々、やるべきことを示してくださったらありがたいです。
##エラー文
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
C:\Users\com\ninsiki\app\src\main\res\layout\activity_cameraus.xml:9: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.example.ninsiki:layout_constraintBottom_toBottomOf) not found.
(以下数行は同じような形のエラーが繰り返されています。)
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
(以下数行は先ほど示したC:から始まるエラー文が繰り返されています。)
###エラーにて示されている場所のソースコード
(activity_cameraus)
java
1<?xml version="1.0" encoding="utf-8"?> 2<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:app="http://schemas.android.com/apk/res-auto" 4 xmlns:tools="http://schemas.android.com/tools" 5 android:layout_width="match_parent" 6 android:layout_height="match_parent" 7 tools:context=".Cameraus"> 8 9 <Button 10 android:id="@+id/camera_button" 11 android:layout_width="143dp" 12 android:layout_height="84dp" 13 android:layout_margin="20dp" 14 android:background="@drawable/clear_button_bg" 15 app:layout_constraintBottom_toBottomOf="parent" 16 app:layout_constraintHorizontal_bias="0.444" 17 app:layout_constraintLeft_toLeftOf="parent" 18 app:layout_constraintRight_toRightOf="parent" 19 app:layout_constraintTop_toTopOf="parent" 20 app:layout_constraintVertical_bias="0.865" /> 21 22 <Button 23 android:id="@+id/collee" 24 android:layout_width="152dp" 25 android:layout_height="72dp" 26 android:background="@drawable/clear_button_bg" 27 app:layout_constraintBottom_toBottomOf="parent" 28 app:layout_constraintEnd_toEndOf="parent" 29 app:layout_constraintHorizontal_bias="0.0" 30 app:layout_constraintStart_toStartOf="parent" 31 app:layout_constraintTop_toTopOf="parent" 32 app:layout_constraintVertical_bias="1.0"/> 33 34 <Button 35 android:id="@+id/collecter" 36 android:layout_width="152dp" 37 android:layout_height="72dp" 38 android:background="@drawable/clear_button_bg" 39 app:layout_constraintBottom_toBottomOf="parent" 40 app:layout_constraintEnd_toEndOf="parent" 41 app:layout_constraintHorizontal_bias="1.0" 42 app:layout_constraintStart_toStartOf="parent" 43 app:layout_constraintTop_toTopOf="parent" 44 app:layout_constraintVertical_bias="1.0" /> 45 <ImageView 46 android:id="@+id/image_vie" 47 android:layout_width="match_parent" 48 android:layout_height="match_parent" 49 android:contentDescription="@string/description" 50 android:src="@drawable/cau" 51 tools:layout_editor_absoluteX="-43dp" 52 tools:layout_editor_absoluteY="67dp" /> 53</androidx.constraintlayout.widget.ConstraintLayout>
####実践したこと
・むしろ色々実践したらこうなってしまった。
あなたの回答
tips
プレビュー