teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

ログキャットの内容の追加とコメントにて指摘された点についての修正

2023/02/03 18:42

投稿

star_moca
star_moca

スコア2

title CHANGED
File without changes
body 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,108 +122,106 @@
96
122
  }
97
123
  }
98
124
  }
125
+ ```
99
126
 
100
- xml
101
- <?xml version="1.0" encoding="utf-8"?>
127
+ ```activity_tabexsample.xml
102
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
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
- android:layout_height="match_parent">
131
+ android:layout_height="match_parent"
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="." >
106
137
 
138
+
107
- <LinearLayout
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
- tools:layout_editor_absoluteX="1dp"
143
+ android:layout_alignParentLeft="true"
112
- tools:layout_editor_absoluteY="83dp">
144
+ android:layout_alignParentTop="true" >
113
145
 
114
- <TextView
146
+ <LinearLayout
115
- android:id="@+id/textView13"
116
147
  android:layout_width="match_parent"
117
- android:layout_height="51dp"
148
+ android:layout_height="match_parent"
118
- android:text="勤務先名"
119
- android:textSize="20sp" />
149
+ android:orientation="vertical" >
120
150
 
121
- <EditText
151
+ <TabWidget
122
- android:id="@+id/editText"
152
+ android:id="@android:id/tabs"
123
- android:layout_width="match_parent"
153
+ android:layout_width="match_parent"
124
- android:layout_height="wrap_content"
154
+ android:layout_height="wrap_content"></TabWidget>
125
- android:ems="10"
126
- android:inputType="textPersonName"
127
- android:text="○○○○" />
128
155
 
129
- <TextView
156
+ <FrameLayout
130
- android:id="@+id/textView14"
157
+ android:id="@android:id/tabcontent"
131
- android:layout_width="match_parent"
158
+ android:layout_width="match_parent"
132
- android:layout_height="40dp"
159
+ android:layout_height="match_parent"
133
- android:text="時給"
134
- android:textSize="20sp" />
160
+ android:orientation="vertical">
135
161
 
136
- <EditText
162
+ <LinearLayout
137
- android:id="@+id/editTextNumber"
163
+ android:id="@+id/tab1"
138
- android:layout_width="match_parent"
164
+ android:layout_width="match_parent"
139
- android:layout_height="wrap_content"
165
+ android:layout_height="match_parent"
140
- android:ems="10"
141
- android:inputType="number" />
166
+ android:orientation="vertical">
142
167
 
143
- <TextView
168
+ <CalendarView
144
- android:id="@+id/textView15"
169
+ android:id="@+id/calendarView2"
145
- android:layout_width="match_parent"
170
+ android:layout_width="match_parent"
146
- android:layout_height="51dp"
171
+ android:layout_height="301dp" />
147
- android:text="開始時刻"
148
- android:textSize="20sp" />
149
172
 
150
- <EditText
173
+ <Button
151
- android:id="@+id/editTextTime"
174
+ android:id="@+id/button20"
152
- android:layout_width="match_parent"
175
+ android:layout_width="match_parent"
153
- android:layout_height="72dp"
176
+ android:layout_height="wrap_content"
154
- android:ems="10"
155
- android:inputType="time" />
177
+ android:text="日曜日" />
156
178
 
157
- <TextView
179
+ <Button
158
- android:id="@+id/textView16"
180
+ android:id="@+id/button21"
159
- android:layout_width="match_parent"
181
+ android:layout_width="match_parent"
160
- android:layout_height="51dp"
182
+ android:layout_height="wrap_content"
161
- android:text="終了時刻"
162
- android:textSize="20sp" />
183
+ android:text="月曜日" />
163
184
 
164
- <EditText
185
+ <Button
165
- android:id="@+id/editTextTime2"
186
+ android:id="@+id/button22"
166
- android:layout_width="match_parent"
187
+ android:layout_width="match_parent"
167
- android:layout_height="73dp"
188
+ android:layout_height="wrap_content"
168
- android:ems="10"
169
- android:inputType="time" />
189
+ android:text="火曜日" />
170
190
 
171
- <EditText
191
+ <Button
172
- android:id="@+id/textView2"
192
+ android:id="@+id/button23"
173
- android:layout_width="match_parent"
193
+ android:layout_width="match_parent"
174
- android:layout_height="80dp"
194
+ android:layout_height="wrap_content"
175
- android:text="表示欄"
176
- android:textSize="20sp" />
195
+ android:text="水曜日" />
177
196
 
178
- <Button
197
+ <Button
179
- android:id="@+id/button12"
198
+ android:id="@+id/button24"
180
- android:layout_width="match_parent"
199
+ android:layout_width="match_parent"
181
- android:layout_height="wrap_content"
200
+ android:layout_height="wrap_content"
182
- android:text="保存"
183
- android:textSize="20sp" />
201
+ android:text="木曜日" />
184
202
 
185
- <Button
203
+ <Button
186
- android:id="@+id/button18"
204
+ android:id="@+id/button25"
187
- android:layout_width="match_parent"
205
+ android:layout_width="match_parent"
188
- android:layout_height="wrap_content"
206
+ android:layout_height="wrap_content"
189
- android:text="表示"
190
- android:textSize="20sp" />
207
+ android:text="金曜日" />
191
208
 
192
- <Button
209
+ <Button
193
- android:id="@+id/button15"
210
+ android:id="@+id/button26"
194
- android:layout_width="match_parent"
211
+ android:layout_width="match_parent"
195
- android:layout_height="wrap_content"
212
+ android:layout_height="wrap_content"
196
- android:text="戻る"
197
- android:textSize="20sp" />
213
+ android:text="土曜日" />
198
- </LinearLayout>
199
- </androidx.constraintlayout.widget.ConstraintLayout>
200
214
 
215
+ </LinearLayout>
216
+
217
+ </FrameLayout>
218
+ </LinearLayout>
219
+ </TabHost>
220
+
221
+ </RelativeLayout>
222
+ ```
223
+
224
+
201
225
  ### 試したこと
202
226
 
203
227
  ここに問題に対して試したことを記載してください。