質問編集履歴

3

コメントの追記

2020/12/14 12:18

投稿

nana_7188
nana_7188

スコア2

test CHANGED
File without changes
test CHANGED
@@ -281,3 +281,61 @@
281
281
 
282
282
 
283
283
  ---
284
+
285
+
286
+
287
+ ♯コメントに対する追記 何度も申し訳ございません。
288
+
289
+
290
+
291
+ ```
292
+
293
+ 2020-12-14 21:11:28.702 21871-21896/com.example.oto E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
294
+
295
+ 2020-12-14 21:11:28.928 21871-21896/com.example.oto D/EGL_emulation: eglMakeCurrent: 0xe7e90700: ver 2 0 (tinfo 0xefb625c0)
296
+
297
+ 2020-12-14 21:11:37.371 21871-21871/com.example.oto D/AndroidRuntime: Shutting down VM
298
+
299
+ 2020-12-14 21:11:37.373 21871-21871/com.example.oto E/AndroidRuntime: FATAL EXCEPTION: main
300
+
301
+ Process: com.example.oto, PID: 21871
302
+
303
+ kotlin.UninitializedPropertyAccessException: lateinit property mediaPlayer has not been initialized
304
+
305
+ at com.example.oto.MainActivity.stopMusic(MainActivity.kt:42)
306
+
307
+ at com.example.oto.MainActivity$onCreate$2.onClick(MainActivity.kt:31)
308
+
309
+ at android.view.View.performClick(View.java:6597)
310
+
311
+ at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)
312
+
313
+ at android.view.View.performClickInternal(View.java:6574)
314
+
315
+ at android.view.View.access$3100(View.java:778)
316
+
317
+ at android.view.View$PerformClick.run(View.java:25885)
318
+
319
+ at android.os.Handler.handleCallback(Handler.java:873)
320
+
321
+ at android.os.Handler.dispatchMessage(Handler.java:99)
322
+
323
+ at android.os.Looper.loop(Looper.java:193)
324
+
325
+ at android.app.ActivityThread.main(ActivityThread.java:6669)
326
+
327
+ at java.lang.reflect.Method.invoke(Native Method)
328
+
329
+ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
330
+
331
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
332
+
333
+ 2020-12-14 21:11:37.395 21871-21871/com.example.oto I/Process: Sending signal. PID: 21871 SIG: 9
334
+
335
+
336
+
337
+ ```
338
+
339
+ #![![エミュレータ](552e8fd414e9f155d3e6a44f5f17ba41.png)]
340
+
341
+ ![ログ](a65529fdc59e1d3145716af419b66a7c.png)

2

コメントへの追記

2020/12/14 12:18

投稿

nana_7188
nana_7188

スコア2

test CHANGED
File without changes
test CHANGED
@@ -221,3 +221,63 @@
221
221
  #写真
222
222
 
223
223
  ![altエラーログ](C)![イメージ説明](c19864edcc24e74d9172b98a72bd6c22.png)
224
+
225
+
226
+
227
+ ♯コメントに対する追記 activity_main
228
+
229
+ ```kotlin
230
+
231
+ <?xml version="1.0" encoding="utf-8"?>
232
+
233
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
234
+
235
+ xmlns:app="http://schemas.android.com/apk/res-auto"
236
+
237
+ xmlns:tools="http://schemas.android.com/tools"
238
+
239
+ android:layout_width="match_parent"
240
+
241
+ android:layout_height="match_parent"
242
+
243
+ tools:context=".MainActivity">
244
+
245
+
246
+
247
+ <Button
248
+
249
+ android:id="@+id/button"
250
+
251
+ android:layout_width="wrap_content"
252
+
253
+ android:layout_height="wrap_content"
254
+
255
+ android:text="@string/start"
256
+
257
+ tools:layout_editor_absoluteX="143dp"
258
+
259
+ tools:layout_editor_absoluteY="119dp" />
260
+
261
+
262
+
263
+ <Button
264
+
265
+ android:id="@+id/button2"
266
+
267
+ android:layout_width="wrap_content"
268
+
269
+ android:layout_height="wrap_content"
270
+
271
+ android:text="@string/stop"
272
+
273
+ tools:layout_editor_absoluteX="138dp"
274
+
275
+ tools:layout_editor_absoluteY="363dp" />
276
+
277
+ </androidx.constraintlayout.widget.ConstraintLayout>
278
+
279
+ ```
280
+
281
+
282
+
283
+ ---

1

コメントに対する追記

2020/12/14 11:46

投稿

nana_7188
nana_7188

スコア2

test CHANGED
File without changes
test CHANGED
@@ -143,3 +143,81 @@
143
143
  #補足情報
144
144
 
145
145
  androidstudio4.1
146
+
147
+
148
+
149
+ #コメントに対する追記となります
150
+
151
+ ```
152
+
153
+ 2020-12-14 19:51:11.901 19828-19828/com.example.oto E/AndroidRuntime: FATAL EXCEPTION: main
154
+
155
+ Process: com.example.oto, PID: 19828
156
+
157
+ java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.oto/com.example.oto.MainActivity}: java.lang.NullPointerException: findViewById(R.id.start_music) must not be null
158
+
159
+ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
160
+
161
+ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
162
+
163
+ at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
164
+
165
+ at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
166
+
167
+ at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
168
+
169
+ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
170
+
171
+ at android.os.Handler.dispatchMessage(Handler.java:106)
172
+
173
+ at android.os.Looper.loop(Looper.java:193)
174
+
175
+ at android.app.ActivityThread.main(ActivityThread.java:6669)
176
+
177
+ at java.lang.reflect.Method.invoke(Native Method)
178
+
179
+ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
180
+
181
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
182
+
183
+ Caused by: java.lang.NullPointerException: findViewById(R.id.start_music) must not be null
184
+
185
+ at com.example.oto.MainActivity.onCreate(MainActivity.kt:19)
186
+
187
+ at android.app.Activity.performCreate(Activity.java:7136)
188
+
189
+ at android.app.Activity.performCreate(Activity.java:7127)
190
+
191
+ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
192
+
193
+ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
194
+
195
+ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 
196
+
197
+ at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
198
+
199
+ at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
200
+
201
+ at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
202
+
203
+ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 
204
+
205
+ at android.os.Handler.dispatchMessage(Handler.java:106) 
206
+
207
+ at android.os.Looper.loop(Looper.java:193) 
208
+
209
+ at android.app.ActivityThread.main(ActivityThread.java:6669) 
210
+
211
+ at java.lang.reflect.Method.invoke(Native Method) 
212
+
213
+ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
214
+
215
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
216
+
217
+
218
+
219
+ ```
220
+
221
+ #写真
222
+
223
+ ![altエラーログ](C)![イメージ説明](c19864edcc24e74d9172b98a72bd6c22.png)