質問編集履歴
1
ログキャットの内容の追加とコメントにて指摘された点についての修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,13 +11,39 @@
|
|
11
11
|
### 発生している問題・エラーメッセージ
|
12
12
|
|
13
13
|
一番上のbutton20を押したときは遷移するのですが、それ以外のボタンを押したときはアプリが落ちてしまいます。何が原因なのでしょうか。
|
14
|
+
ログキャットの内容
|
15
|
+
```
|
16
|
+
2023-02-04 03:32:20.508 13666-13710/es.exsample E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
|
17
|
+
2023-02-04 03:32:54.311 13666-13666/es.exsample E/AndroidRuntime: FATAL EXCEPTION: main
|
18
|
+
Process: es.exsample, PID: 13666
|
19
|
+
android.content.ActivityNotFoundException: Unable to find explicit activity class {es.exsample/es.exsample.Calendar_Mon}; have you declared this activity in your AndroidManifest.xml?
|
20
|
+
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005)
|
21
|
+
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
|
22
|
+
at android.app.Activity.startActivityForResult(Activity.java:4586)
|
23
|
+
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:705)
|
24
|
+
at android.app.Activity.startActivityForResult(Activity.java:4544)
|
25
|
+
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:686)
|
26
|
+
at android.app.Activity.startActivity(Activity.java:4905)
|
27
|
+
at android.app.Activity.startActivity(Activity.java:4873)
|
28
|
+
at es.exsample.ExSample.onClick(ExSample.java:60)
|
29
|
+
at es.exsample.ExSample$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
|
30
|
+
at android.view.View.performClick(View.java:6597)
|
31
|
+
at android.view.View.performClickInternal(View.java:6574)
|
32
|
+
at android.view.View.access$3100(View.java:778)
|
33
|
+
at android.view.View$PerformClick.run(View.java:25885)
|
34
|
+
at android.os.Handler.handleCallback(Handler.java:873)
|
35
|
+
at android.os.Handler.dispatchMessage(Handler.java:99)
|
36
|
+
at android.os.Looper.loop(Looper.java:193)
|
37
|
+
at android.app.ActivityThread.main(ActivityThread.java:6669)
|
38
|
+
at java.lang.reflect.Method.invoke(Native Method)
|
39
|
+
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
|
40
|
+
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
|
41
|
+
```
|
14
42
|
|
15
43
|
### 該当のソースコード
|
16
44
|
|
17
|
-
java
|
45
|
+
言語:java
|
18
|
-
|
19
|
-
ソースコード
|
20
|
-
ExSample.java
|
46
|
+
```ExSample.java
|
21
47
|
package es.exsample;
|
22
48
|
|
23
49
|
import android.content.Intent;
|
@@ -96,107 +122,105 @@
|
|
96
122
|
}
|
97
123
|
}
|
98
124
|
}
|
99
|
-
|
100
|
-
|
125
|
+
```
|
126
|
+
|
101
|
-
|
127
|
+
```activity_tabexsample.xml
|
102
|
-
<
|
128
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
103
129
|
xmlns:tools="http://schemas.android.com/tools"
|
104
130
|
android:layout_width="match_parent"
|
105
|
-
|
131
|
+
android:layout_height="match_parent"
|
106
|
-
|
132
|
+
android:paddingBottom="@dimen/activity_vertical_margin"
|
133
|
+
android:paddingLeft="@dimen/activity_horizontal_margin"
|
134
|
+
android:paddingRight="@dimen/activity_horizontal_margin"
|
135
|
+
android:paddingTop="@dimen/activity_vertical_margin"
|
136
|
+
tools:context="." >
|
137
|
+
|
138
|
+
|
107
|
-
<
|
139
|
+
<TabHost
|
140
|
+
android:id="@android:id/tabhost"
|
108
141
|
android:layout_width="match_parent"
|
109
142
|
android:layout_height="match_parent"
|
110
|
-
android:orientation="vertical"
|
111
|
-
|
143
|
+
android:layout_alignParentLeft="true"
|
112
|
-
|
144
|
+
android:layout_alignParentTop="true" >
|
113
|
-
|
145
|
+
|
114
|
-
<
|
146
|
+
<LinearLayout
|
115
|
-
android:id="@+id/textView13"
|
116
147
|
android:layout_width="match_parent"
|
117
|
-
android:layout_height="
|
118
|
-
android:
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
android:id="
|
123
|
-
android:layout_
|
124
|
-
|
125
|
-
a
|
126
|
-
android:i
|
127
|
-
android:t
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
a
|
132
|
-
android:
|
133
|
-
android:t
|
134
|
-
android:te
|
135
|
-
|
136
|
-
|
137
|
-
andr
|
138
|
-
android:
|
139
|
-
android:layout_
|
140
|
-
android:e
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
android:id="
|
145
|
-
android:layout_
|
146
|
-
android:
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
android:i
|
152
|
-
android:
|
153
|
-
|
154
|
-
|
155
|
-
android:i
|
156
|
-
|
157
|
-
|
158
|
-
android:
|
159
|
-
|
160
|
-
|
161
|
-
android:t
|
162
|
-
android:t
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
android:
|
168
|
-
android:
|
169
|
-
android:
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
android:
|
174
|
-
android:layout_
|
175
|
-
android:te
|
176
|
-
android:text
|
177
|
-
|
178
|
-
<Button
|
179
|
-
android:id="@+id/button
|
180
|
-
android:layout_width="match_parent"
|
181
|
-
android:layout_height="wrap_content"
|
182
|
-
android:text="
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
a
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
android:id="@+id/button15"
|
194
|
-
android:layout_width="match_parent"
|
195
|
-
android:layout_height="wrap_content"
|
196
|
-
android:text="戻る"
|
197
|
-
android:textSize="20sp" />
|
198
|
-
</LinearLayout>
|
199
|
-
</androidx.constraintlayout.widget.ConstraintLayout>
|
148
|
+
android:layout_height="match_parent"
|
149
|
+
android:orientation="vertical" >
|
150
|
+
|
151
|
+
<TabWidget
|
152
|
+
android:id="@android:id/tabs"
|
153
|
+
android:layout_width="match_parent"
|
154
|
+
android:layout_height="wrap_content"></TabWidget>
|
155
|
+
|
156
|
+
<FrameLayout
|
157
|
+
android:id="@android:id/tabcontent"
|
158
|
+
android:layout_width="match_parent"
|
159
|
+
android:layout_height="match_parent"
|
160
|
+
android:orientation="vertical">
|
161
|
+
|
162
|
+
<LinearLayout
|
163
|
+
android:id="@+id/tab1"
|
164
|
+
android:layout_width="match_parent"
|
165
|
+
android:layout_height="match_parent"
|
166
|
+
android:orientation="vertical">
|
167
|
+
|
168
|
+
<CalendarView
|
169
|
+
android:id="@+id/calendarView2"
|
170
|
+
android:layout_width="match_parent"
|
171
|
+
android:layout_height="301dp" />
|
172
|
+
|
173
|
+
<Button
|
174
|
+
android:id="@+id/button20"
|
175
|
+
android:layout_width="match_parent"
|
176
|
+
android:layout_height="wrap_content"
|
177
|
+
android:text="日曜日" />
|
178
|
+
|
179
|
+
<Button
|
180
|
+
android:id="@+id/button21"
|
181
|
+
android:layout_width="match_parent"
|
182
|
+
android:layout_height="wrap_content"
|
183
|
+
android:text="月曜日" />
|
184
|
+
|
185
|
+
<Button
|
186
|
+
android:id="@+id/button22"
|
187
|
+
android:layout_width="match_parent"
|
188
|
+
android:layout_height="wrap_content"
|
189
|
+
android:text="火曜日" />
|
190
|
+
|
191
|
+
<Button
|
192
|
+
android:id="@+id/button23"
|
193
|
+
android:layout_width="match_parent"
|
194
|
+
android:layout_height="wrap_content"
|
195
|
+
android:text="水曜日" />
|
196
|
+
|
197
|
+
<Button
|
198
|
+
android:id="@+id/button24"
|
199
|
+
android:layout_width="match_parent"
|
200
|
+
android:layout_height="wrap_content"
|
201
|
+
android:text="木曜日" />
|
202
|
+
|
203
|
+
<Button
|
204
|
+
android:id="@+id/button25"
|
205
|
+
android:layout_width="match_parent"
|
206
|
+
android:layout_height="wrap_content"
|
207
|
+
android:text="金曜日" />
|
208
|
+
|
209
|
+
<Button
|
210
|
+
android:id="@+id/button26"
|
211
|
+
android:layout_width="match_parent"
|
212
|
+
android:layout_height="wrap_content"
|
213
|
+
android:text="土曜日" />
|
214
|
+
|
215
|
+
</LinearLayout>
|
216
|
+
|
217
|
+
</FrameLayout>
|
218
|
+
</LinearLayout>
|
219
|
+
</TabHost>
|
220
|
+
|
221
|
+
</RelativeLayout>
|
222
|
+
```
|
223
|
+
|
200
224
|
|
201
225
|
### 試したこと
|
202
226
|
|