質問編集履歴

3

文法の修正

2021/12/06 05:12

投稿

takk_014
takk_014

スコア53

test CHANGED
File without changes
test CHANGED
@@ -86,7 +86,7 @@
86
86
 
87
87
  at java.lang.Class.getMethod(Class.java:1693)
88
88
 
89
- at com.kyowa.raspicameraviewer.MainActivity.onCreate(MainActivity.kt:76)
89
+ at com.-------------r.MainActivity.onCreate(MainActivity.kt:76)
90
90
 
91
91
  at android.app.Activity.performCreate(Activity.java:8207)
92
92
 

2

文法の修正

2021/12/06 05:12

投稿

takk_014
takk_014

スコア53

test CHANGED
File without changes
test CHANGED
@@ -50,7 +50,7 @@
50
50
 
51
51
  ```ここに言語を入力
52
52
 
53
- 2021-12-06 14:06:12.487 25673-25673/com.kyowa.raspicameraviewer E/AndroidRuntime: FATAL EXCEPTION: main
53
+ 2021-12-06 14:06:12.487 25673-25673/------ E/AndroidRuntime: FATAL EXCEPTION: main
54
54
 
55
55
  Process: com.----------------, PID: 25673
56
56
 

1

追記

2021/12/06 05:10

投稿

takk_014
takk_014

スコア53

test CHANGED
File without changes
test CHANGED
@@ -43,6 +43,80 @@
43
43
  method.setAccessible(true)
44
44
 
45
45
  method.invoke(connectivityManager, false)
46
+
47
+ ```
48
+
49
+ 落ちた時のログ
50
+
51
+ ```ここに言語を入力
52
+
53
+ 2021-12-06 14:06:12.487 25673-25673/com.kyowa.raspicameraviewer E/AndroidRuntime: FATAL EXCEPTION: main
54
+
55
+ Process: com.----------------, PID: 25673
56
+
57
+ java.lang.RuntimeException: Unable to start activity ComponentInfo{-------------.MainActivity}: java.lang.NoSuchMethodException: android.net.ConnectivityManager.setMobileDataEnabled [boolean]
58
+
59
+ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3835)
60
+
61
+ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4011)
62
+
63
+ at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
64
+
65
+ at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
66
+
67
+ at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
68
+
69
+ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
70
+
71
+ at android.os.Handler.dispatchMessage(Handler.java:106)
72
+
73
+ at android.os.Looper.loop(Looper.java:246)
74
+
75
+ at android.app.ActivityThread.main(ActivityThread.java:8633)
76
+
77
+ at java.lang.reflect.Method.invoke(Native Method)
78
+
79
+ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
80
+
81
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
82
+
83
+ Caused by: java.lang.NoSuchMethodException: android.net.ConnectivityManager.setMobileDataEnabled [boolean]
84
+
85
+ at java.lang.Class.getMethod(Class.java:2072)
86
+
87
+ at java.lang.Class.getMethod(Class.java:1693)
88
+
89
+ at com.kyowa.raspicameraviewer.MainActivity.onCreate(MainActivity.kt:76)
90
+
91
+ at android.app.Activity.performCreate(Activity.java:8207)
92
+
93
+ at android.app.Activity.performCreate(Activity.java:8191)
94
+
95
+ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
96
+
97
+ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3808)
98
+
99
+ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4011)
100
+
101
+ at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
102
+
103
+ at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
104
+
105
+ at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
106
+
107
+ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
108
+
109
+ at android.os.Handler.dispatchMessage(Handler.java:106)
110
+
111
+ at android.os.Looper.loop(Looper.java:246)
112
+
113
+ at android.app.ActivityThread.main(ActivityThread.java:8633)
114
+
115
+ at java.lang.reflect.Method.invoke(Native Method)
116
+
117
+ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
118
+
119
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
46
120
 
47
121
  ```
48
122