私は、Androidに新たなんだ動作しません、私はアンドロイドのスタジオで私の最初のシンプルなアプリを作成するのではなく、制約は、レイアウトは実際の電話または仮想電話で正しく動作しません。私は意図レイアウトの中央にボタンを配置し、レイアウトの上部のエディットテキストが、私は実行すると、その両方が右上のレイアウトで同じ位置に位置しているので、私は、テキストを入力し、ボタンを押すことはできませんします。
私はRelativeLayoutを使用しようとすると、それは問題がConstraintLayoutから来たと思うので、働いた。私はそれを修正するのを助けてください!
私はすでに「1.0.1以下のConstraintsLayout」と「1.0.1以下のSolver For ConstraintsLayout」をインストールしています。私は、Android Studioバージョン2.3を使用し build.gradleでコンパイル「1.0.1:制約レイアウトcom.android.support.constraint」を追加しました。 そしてここでは私のXMLコードです:制約のAndroidメーカーのレイアウトが正しく
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="my.android.myfirstapp.MainActivity">
<Button
android:id="@+id/btn_jump"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Jump Activity"
tools:layout_editor_absoluteX="128dp"
tools:layout_editor_absoluteY="269dp" />
<EditText
android:id="@+id/edt_Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:text=""
tools:layout_editor_absoluteX="85dp"
tools:layout_editor_absoluteY="62dp" />
</android.support.constraint.ConstraintLayout>
をマーク行う動作するかどうかであり、私はあなたのイメージのような警告やエラーが表示されませんでした。あなたのコードは完璧に実行され、コードのいくつかが正しく動作するようにしました。app:layout_constraintBottom_toBottomOf = "parent"、app:layout_constraintRight_toRightOf = "parent"、app:layout_constraintLeft_toLeftOf = "parent" app:layout_constraintTop_toTopOf = "親"最後に、あなたの助けに感謝! (申し訳ありませんが、私はこのコメントのコードフォーマットを作る方法を知らない) –