お世話になります。参考書を参考にアプリを作ろうとしているのですが、なぜか9行目の<TableLayoutでエラーがでます。どこがいけないのかヒントでも良いので教えて下さい。エミュレータで起動することは可能です。
エラーメッセージは
Preview timed out while rendering the layout. This typically happnes when there is an infinite loop or unbounded recusion in one of custom views.
環境は Windows7 androidstudio2.3.3
エミュレータはNexusS API24
<?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="com.example.lc_22k5.myapplication.MainActivity"> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="8dp"> <TableRow android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" tools:layout_editor_absoluteX="163dp" tools:layout_editor_absoluteY="441dp" /> <EditText android:id="@+id/editText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" android:text="Name" /> </TableRow> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" > <Button android:id="@+id/save" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/transmit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/delete" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> </TableRow> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /> </TableRow> </TableLayout> </android.support.constraint.ConstraintLayout>
したいことは次のようにしたいです。
textview [ edittext ]
Button Button Button
textview
上みたにしたいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/11/03 09:02
退会済みユーザー
2017/11/03 09:02