Android Studio 2.2中的新版式编辑器不断在诸如EditText和Buttons之类的视图上显示此错误。友善的帮助。此外,任何有助于新约束布局入门的链接都将受到赞赏。
码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
android:id="@+id/activity_main"
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="com.set.email.MainActivity"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="81dp">
<TextView
android:text="To:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:layout_editor_absoluteX="7dp"
tools:layout_editor_absoluteY="4dp"
android:id="@+id/textTo"/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:ems="10"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="24dp"
android:id="@+id/editTo"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"/>
<EditText
android:layout_width="384dp"
android:layout_height="42dp"
android:inputType="textPersonName"
android:ems="10"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="94dp"
android:id="@+id/editSubject"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"/>
<EditText
android:layout_width="384dp"
android:layout_height="273dp"
android:inputType="textPersonName"
android:ems="10"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="179dp"
android:id="@+id/editMessage"
app:layout_constraintLeft_toLeftOf="@+id/activity_main"
tools:layout_constraintLeft_creator="50"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"/>
<Button
android:text="Send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:layout_editor_absoluteX="140dp"
tools:layout_editor_absoluteY="454dp"
android:id="@+id/btnSend"
app:layout_constraintLeft_toLeftOf="@+id/editMessage"
tools:layout_constraintLeft_creator="0"
app:layout_constraintRight_toRightOf="@+id/activity_main"
android:layout_marginEnd="16dp"
tools:layout_constraintRight_creator="0"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"/>
</android.support.constraint.ConstraintLayout>