質問編集履歴
5
JAVA の一部を修正しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,15 +38,15 @@
|
|
38
38
|
|
39
39
|
@Override
|
40
40
|
|
41
|
+
setContentView(R.layout.activity_main);
|
42
|
+
|
41
|
-
|
43
|
+
WebView myWebView=(WebView)findViewById(R.id.webView1) ;
|
44
|
+
|
42
|
-
|
45
|
+
myWebView.setWebViewClient(new WebViewClient());
|
46
|
+
|
47
|
+
myWebView.loadUrl("http://www.yahoo.co.jp");
|
48
|
+
|
43
|
-
super.onCreate(savedInstanceState);
|
49
|
+
super.onCreate(savedInstanceState);
|
44
|
-
|
45
|
-
WebView myWebView = (WebView) findViewById(R.id.webView);
|
46
|
-
|
47
|
-
myWebView.setWebViewClient(new WebViewClient());
|
48
|
-
|
49
|
-
myWebView.loadUrl("https://www.yahoo.co.jp");
|
50
50
|
|
51
51
|
//**************** APIキーの設定とSDKの初期化 **********************
|
52
52
|
|
4
XMLのミスを更新しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,28 +2,32 @@
|
|
2
2
|
|
3
3
|
```XML
|
4
4
|
|
5
|
-
xmlns:android="http://schemas.android.com/apk/res/android"
|
5
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
6
|
-
|
6
|
+
|
7
|
-
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
7
|
+
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
8
|
-
|
8
|
+
|
9
|
-
android:layout_height="match_parent"
|
9
|
+
android:layout_height="match_parent"
|
10
|
-
|
10
|
+
|
11
|
-
tools:context=".MainActivity">
|
11
|
+
tools:context=".MainActivity">
|
12
12
|
|
13
13
|
|
14
14
|
|
15
15
|
<WebView
|
16
16
|
|
17
|
+
android:id="@+id/webView1"
|
18
|
+
|
17
|
-
android:layout_width="fill_parent"
|
19
|
+
android:layout_width="fill_parent"
|
18
|
-
|
20
|
+
|
19
|
-
android:layout_height="fill_parent"
|
21
|
+
android:layout_height="fill_parent"
|
20
|
-
|
22
|
+
|
21
|
-
|
23
|
+
></WebView>
|
22
24
|
|
23
25
|
|
24
26
|
|
25
27
|
</RelativeLayout>
|
26
28
|
|
29
|
+
|
30
|
+
|
27
31
|
```
|
28
32
|
|
29
33
|
```JAVA
|
3
エラーログを更新しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Niftyのサンプルコードを利用してプッシュ通知とWEBVIEWを導入したいのですが、エミュレータで起動するとクラッシュします。どうすればいいですか?
|
1
|
+
初心者です。Niftyのサンプルコードを利用してプッシュ通知とWEBVIEWを導入したいのですが、エミュレータで起動するとクラッシュします。どうすればいいですか?
|
2
2
|
|
3
3
|
```XML
|
4
4
|
|
2
エラーログの内容を更新しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -204,62 +204,68 @@
|
|
204
204
|
|
205
205
|
```
|
206
206
|
|
207
|
-
09-10 02:
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
at android.app.ActivityThread.
|
218
|
-
|
219
|
-
at android.app.ActivityThread.handle
|
220
|
-
|
221
|
-
at android.
|
222
|
-
|
223
|
-
at android.
|
224
|
-
|
225
|
-
at android.
|
226
|
-
|
227
|
-
at an
|
228
|
-
|
229
|
-
at android.a
|
230
|
-
|
231
|
-
at
|
232
|
-
|
233
|
-
a
|
234
|
-
|
235
|
-
at
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
at
|
240
|
-
|
241
|
-
at android.app.Activity.
|
242
|
-
|
243
|
-
at an
|
244
|
-
|
245
|
-
at android.app.Activity
|
246
|
-
|
247
|
-
at android.app.
|
248
|
-
|
249
|
-
at android.app.ActivityThread.
|
250
|
-
|
251
|
-
at android.app.ActivityThread
|
252
|
-
|
253
|
-
at android.
|
254
|
-
|
255
|
-
at android.
|
256
|
-
|
257
|
-
at android.a
|
258
|
-
|
259
|
-
at
|
260
|
-
|
261
|
-
at
|
262
|
-
|
263
|
-
at
|
264
|
-
|
265
|
-
|
207
|
+
09-10 03:52:31.786 2773-2773/mbaas.com.nifty.ncmbpushquickstart E/AndroidRuntime: FATAL EXCEPTION: main
|
208
|
+
|
209
|
+
Process: mbaas.com.nifty.ncmbpushquickstart, PID: 2773
|
210
|
+
|
211
|
+
java.lang.RuntimeException: Unable to start activity ComponentInfo{mbaas.com.nifty.ncmbpushquickstart/mbaas.com.nifty.ncmbpushquickstart.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.ViewGroup.getPaddingLeft()' on a null object reference
|
212
|
+
|
213
|
+
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
|
214
|
+
|
215
|
+
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
|
216
|
+
|
217
|
+
at android.app.ActivityThread.-wrap11(ActivityThread.java)
|
218
|
+
|
219
|
+
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
|
220
|
+
|
221
|
+
at android.os.Handler.dispatchMessage(Handler.java:102)
|
222
|
+
|
223
|
+
at android.os.Looper.loop(Looper.java:148)
|
224
|
+
|
225
|
+
at android.app.ActivityThread.main(ActivityThread.java:5417)
|
226
|
+
|
227
|
+
at java.lang.reflect.Method.invoke(Native Method)
|
228
|
+
|
229
|
+
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
|
230
|
+
|
231
|
+
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
|
232
|
+
|
233
|
+
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.ViewGroup.getPaddingLeft()' on a null object reference
|
234
|
+
|
235
|
+
at android.support.v7.app.AppCompatDelegateImplV7.applyFixedSizeWindow(AppCompatDelegateImplV7.java:476)
|
236
|
+
|
237
|
+
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:286)
|
238
|
+
|
239
|
+
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:252)
|
240
|
+
|
241
|
+
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
|
242
|
+
|
243
|
+
at mbaas.com.nifty.ncmbpushquickstart.MainActivity.onCreate(MainActivity.java:24)
|
244
|
+
|
245
|
+
at android.app.Activity.performCreate(Activity.java:6237)
|
246
|
+
|
247
|
+
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
|
248
|
+
|
249
|
+
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
|
250
|
+
|
251
|
+
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
|
252
|
+
|
253
|
+
at android.app.ActivityThread.-wrap11(ActivityThread.java)
|
254
|
+
|
255
|
+
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
|
256
|
+
|
257
|
+
at android.os.Handler.dispatchMessage(Handler.java:102)
|
258
|
+
|
259
|
+
at android.os.Looper.loop(Looper.java:148)
|
260
|
+
|
261
|
+
at android.app.ActivityThread.main(ActivityThread.java:5417)
|
262
|
+
|
263
|
+
at java.lang.reflect.Method.invoke(Native Method)
|
264
|
+
|
265
|
+
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
|
266
|
+
|
267
|
+
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
```
|
1
エラーログを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -199,3 +199,67 @@
|
|
199
199
|
}
|
200
200
|
|
201
201
|
```
|
202
|
+
|
203
|
+
エラーログです。
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
09-10 02:44:34.467 2929-3261/mbaas.com.nifty.ncmbpushquickstart E/GMPM: getGoogleAppId failed with status: 10
|
208
|
+
|
209
|
+
09-10 02:44:34.468 2929-3261/mbaas.com.nifty.ncmbpushquickstart E/GMPM: Uploading is not possible. App measurement disabled
|
210
|
+
|
211
|
+
09-10 02:44:34.548 2929-2929/mbaas.com.nifty.ncmbpushquickstart E/AndroidRuntime: FATAL EXCEPTION: main
|
212
|
+
|
213
|
+
Process: mbaas.com.nifty.ncmbpushquickstart, PID: 2929
|
214
|
+
|
215
|
+
java.lang.RuntimeException: Unable to start activity ComponentInfo{mbaas.com.nifty.ncmbpushquickstart/mbaas.com.nifty.ncmbpushquickstart.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.webkit.WebView.setWebViewClient(android.webkit.WebViewClient)' on a null object reference
|
216
|
+
|
217
|
+
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
|
218
|
+
|
219
|
+
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
|
220
|
+
|
221
|
+
at android.app.ActivityThread.-wrap11(ActivityThread.java)
|
222
|
+
|
223
|
+
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
|
224
|
+
|
225
|
+
at android.os.Handler.dispatchMessage(Handler.java:102)
|
226
|
+
|
227
|
+
at android.os.Looper.loop(Looper.java:148)
|
228
|
+
|
229
|
+
at android.app.ActivityThread.main(ActivityThread.java:5417)
|
230
|
+
|
231
|
+
at java.lang.reflect.Method.invoke(Native Method)
|
232
|
+
|
233
|
+
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
|
234
|
+
|
235
|
+
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
|
236
|
+
|
237
|
+
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.webkit.WebView.setWebViewClient(android.webkit.WebViewClient)' on a null object reference
|
238
|
+
|
239
|
+
at mbaas.com.nifty.ncmbpushquickstart.MainActivity.onCreate(MainActivity.java:25)
|
240
|
+
|
241
|
+
at android.app.Activity.performCreate(Activity.java:6237)
|
242
|
+
|
243
|
+
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
|
244
|
+
|
245
|
+
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
|
246
|
+
|
247
|
+
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
|
248
|
+
|
249
|
+
at android.app.ActivityThread.-wrap11(ActivityThread.java)
|
250
|
+
|
251
|
+
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
|
252
|
+
|
253
|
+
at android.os.Handler.dispatchMessage(Handler.java:102)
|
254
|
+
|
255
|
+
at android.os.Looper.loop(Looper.java:148)
|
256
|
+
|
257
|
+
at android.app.ActivityThread.main(ActivityThread.java:5417)
|
258
|
+
|
259
|
+
at java.lang.reflect.Method.invoke(Native Method)
|
260
|
+
|
261
|
+
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
|
262
|
+
|
263
|
+
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
|
264
|
+
|
265
|
+
```
|