質問編集履歴

2

解決方法を書いた

2017/04/02 12:55

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -59,3 +59,49 @@
59
59
  その他バグと状態
60
60
 
61
61
  ![イメージ説明](05d9d17358434b8c3455cf325a8c26a5.png)
62
+
63
+
64
+
65
+ 解決しました。
66
+
67
+ ```
68
+
69
+ <?xml version="1.0" encoding="utf-8"?>
70
+
71
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
72
+
73
+ xmlns:app="http://schemas.android.com/apk/res-auto"
74
+
75
+ xmlns:tools="http://schemas.android.com/tools"
76
+
77
+ android:layout_width="match_parent"
78
+
79
+ android:layout_height="match_parent"
80
+
81
+ tools:context="com.spinner.myapplication.MainActivity">
82
+
83
+
84
+
85
+ <TextView
86
+
87
+ android:layout_width="wrap_content"
88
+
89
+ android:layout_height="wrap_content"
90
+
91
+ android:text="Hello World!"
92
+
93
+ app:layout_constraintBottom_toBottomOf="parent"
94
+
95
+ app:layout_constraintLeft_toLeftOf="parent"
96
+
97
+ app:layout_constraintRight_toRightOf="parent"
98
+
99
+ app:layout_constraintTop_toTopOf="parent" />
100
+
101
+
102
+
103
+ </RelativeLayout>
104
+
105
+
106
+
107
+ ```

1

返信

2017/04/02 12:55

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -5,3 +5,57 @@
5
5
  バージョンは2.3です。
6
6
 
7
7
  ![![activity_main.xml](371887080b2062ef889b00c443d593e6.png)](7579997502583a57c354f67a85e0bc35.png)
8
+
9
+
10
+
11
+ 回答者に返信
12
+
13
+ activity_main.xml
14
+
15
+ ```
16
+
17
+ <?xml version="1.0" encoding="utf-8"?>
18
+
19
+ <android.support.constraint.RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
20
+
21
+ xmlns:app="http://schemas.android.com/apk/res-auto"
22
+
23
+ xmlns:tools="http://schemas.android.com/tools"
24
+
25
+ android:layout_width="match_parent"
26
+
27
+ android:layout_height="match_parent"
28
+
29
+ tools:context="com.spinner.myapplication.MainActivity">
30
+
31
+
32
+
33
+ <TextView
34
+
35
+ android:layout_width="wrap_content"
36
+
37
+ android:layout_height="wrap_content"
38
+
39
+ android:text="Hello World!"
40
+
41
+ app:layout_constraintBottom_toBottomOf="parent"
42
+
43
+ app:layout_constraintLeft_toLeftOf="parent"
44
+
45
+ app:layout_constraintRight_toRightOf="parent"
46
+
47
+ app:layout_constraintTop_toTopOf="parent" />
48
+
49
+
50
+
51
+ </android.support.constraint.RelativeLayout>
52
+
53
+ ```
54
+
55
+ エミュレーターで実行するとMy Applicationが停止しましたと表示される。
56
+
57
+ ログにはなにも出てない。
58
+
59
+ その他バグと状態
60
+
61
+ ![イメージ説明](05d9d17358434b8c3455cf325a8c26a5.png)