質問編集履歴
16
title
CHANGED
File without changes
|
body
CHANGED
@@ -119,6 +119,7 @@
|
|
119
119
|
return true;
|
120
120
|
}
|
121
121
|
```を追加してみましたが、変わりませんでした。
|
122
|
+
※yonaさんの意見により、performClickメソッドは、削除しました。
|
122
123
|
|
123
124
|
###logcat
|
124
125
|
```
|
15
編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -238,6 +238,7 @@
|
|
238
238
|
}
|
239
239
|
}
|
240
240
|
```
|
241
|
+
解決につながることを願います。
|
241
242
|
|
242
243
|
###補足情報(環境)
|
243
244
|
OS OSX Yosemite 10.10.5
|
14
訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -145,7 +145,8 @@
|
|
145
145
|
|
146
146
|
yonaさんのご指摘により、SelectActivityの56行目でNullPointerExceptionが発生しているようなので、コードを掲載しておきます。
|
147
147
|
|
148
|
+
```
|
148
|
-
|
149
|
+
package jp.co.hokkaido.nakafurano.hideo.kodama.vulkan;
|
149
150
|
|
150
151
|
import android.app.Activity;
|
151
152
|
import android.content.Intent;
|
@@ -235,7 +236,8 @@
|
|
235
236
|
imgAVS.setLayoutParams(mlpA);
|
236
237
|
linearLayout.addView(imgAVS);
|
237
238
|
}
|
239
|
+
}
|
238
|
-
|
240
|
+
```
|
239
241
|
|
240
242
|
###補足情報(環境)
|
241
243
|
OS OSX Yosemite 10.10.5
|
13
編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -137,7 +137,8 @@
|
|
137
137
|
at java.lang.reflect.Method.invoke(Method.java:511)
|
138
138
|
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:974)
|
139
139
|
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
140
|
-
at dalvik.system.NativeStart.main(Native Method)
|
140
|
+
at dalvik.system.NativeStart.main(Native Method)
|
141
|
+
```
|
141
142
|
|
142
143
|
|
143
144
|
###NullPointerExceptionについて(SelectActivity.java)
|
12
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -137,7 +137,7 @@
|
|
137
137
|
at java.lang.reflect.Method.invoke(Method.java:511)
|
138
138
|
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:974)
|
139
139
|
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
140
|
-
at dalvik.system.NativeStart.main(Native Method)
|
140
|
+
at dalvik.system.NativeStart.main(Native Method) ```
|
141
141
|
|
142
142
|
|
143
143
|
###NullPointerExceptionについて(SelectActivity.java)
|
11
特になし
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
10
改行
title
CHANGED
File without changes
|
body
CHANGED
@@ -141,7 +141,9 @@
|
|
141
141
|
|
142
142
|
|
143
143
|
###NullPointerExceptionについて(SelectActivity.java)
|
144
|
+
|
144
145
|
yonaさんのご指摘により、SelectActivityの56行目でNullPointerExceptionが発生しているようなので、コードを掲載しておきます。
|
146
|
+
|
145
147
|
```package jp.co.hokkaido.nakafurano.hideo.kodama.vulkan;
|
146
148
|
|
147
149
|
import android.app.Activity;
|
@@ -232,8 +234,7 @@
|
|
232
234
|
imgAVS.setLayoutParams(mlpA);
|
233
235
|
linearLayout.addView(imgAVS);
|
234
236
|
}
|
235
|
-
}
|
236
|
-
```
|
237
|
+
}```
|
237
238
|
|
238
239
|
###補足情報(環境)
|
239
240
|
OS OSX Yosemite 10.10.5
|
9
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -137,7 +137,7 @@
|
|
137
137
|
at java.lang.reflect.Method.invoke(Method.java:511)
|
138
138
|
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:974)
|
139
139
|
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
140
|
-
at dalvik.system.NativeStart.main(Native Method)
|
140
|
+
at dalvik.system.NativeStart.main(Native Method)
|
141
141
|
|
142
142
|
|
143
143
|
###NullPointerExceptionについて(SelectActivity.java)
|
8
改行
title
CHANGED
File without changes
|
body
CHANGED
@@ -139,6 +139,7 @@
|
|
139
139
|
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
140
140
|
at dalvik.system.NativeStart.main(Native Method) ```
|
141
141
|
|
142
|
+
|
142
143
|
###NullPointerExceptionについて(SelectActivity.java)
|
143
144
|
yonaさんのご指摘により、SelectActivityの56行目でNullPointerExceptionが発生しているようなので、コードを掲載しておきます。
|
144
145
|
```package jp.co.hokkaido.nakafurano.hideo.kodama.vulkan;
|
7
編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -137,7 +137,7 @@
|
|
137
137
|
at java.lang.reflect.Method.invoke(Method.java:511)
|
138
138
|
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:974)
|
139
139
|
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
140
|
-
at dalvik.system.NativeStart.main(Native Method)```
|
140
|
+
at dalvik.system.NativeStart.main(Native Method) ```
|
141
141
|
|
142
142
|
###NullPointerExceptionについて(SelectActivity.java)
|
143
143
|
yonaさんのご指摘により、SelectActivityの56行目でNullPointerExceptionが発生しているようなので、コードを掲載しておきます。
|
6
特になし
title
CHANGED
File without changes
|
body
CHANGED
@@ -140,7 +140,6 @@
|
|
140
140
|
at dalvik.system.NativeStart.main(Native Method)```
|
141
141
|
|
142
142
|
###NullPointerExceptionについて(SelectActivity.java)
|
143
|
-
|
144
143
|
yonaさんのご指摘により、SelectActivityの56行目でNullPointerExceptionが発生しているようなので、コードを掲載しておきます。
|
145
144
|
```package jp.co.hokkaido.nakafurano.hideo.kodama.vulkan;
|
146
145
|
|
5
SelectActivity\.javaのコード掲載
title
CHANGED
File without changes
|
body
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
public boolean onTouchEvent(MotionEvent event) {
|
74
74
|
int touchAction = event.getAction();
|
75
75
|
if (touchAction == MotionEvent.ACTION_DOWN) {
|
76
|
-
getContext().startActivity(new Intent(getContext(),
|
76
|
+
getContext().startActivity(new Intent(getContext(), SelectView.class));
|
77
77
|
|
78
78
|
}
|
79
79
|
return true;
|
@@ -121,29 +121,7 @@
|
|
121
121
|
```を追加してみましたが、変わりませんでした。
|
122
122
|
|
123
123
|
###logcat
|
124
|
-
```06-02 18:36:51.697 3772-20292/? E/ClientConnectionOperation﹕ Handling ConnectionFailedException
|
125
|
-
com.google.android.gms.drive.api.a.r: Unable to resolve account name.
|
126
|
-
at com.google.android.gms.drive.api.a.q.a(:com.google.android.gms:71)
|
127
|
-
at com.google.android.gms.common.service.f.run(:com.google.android.gms:176)
|
128
|
-
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
|
129
|
-
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
|
130
|
-
at com.google.android.gms.common.util.a.c.run(:com.google.android.gms:17)
|
131
|
-
|
124
|
+
```
|
132
|
-
06-02 18:36:55.247 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
133
|
-
06-02 18:36:55.247 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
134
|
-
06-02 18:36:57.817 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
135
|
-
06-02 18:36:57.817 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
136
|
-
06-02 18:37:00.377 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
137
|
-
06-02 18:37:00.377 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
138
|
-
06-02 18:37:01.717 3772-20298/? E/ClientConnectionOperation﹕ Handling ConnectionFailedException
|
139
|
-
com.google.android.gms.drive.api.a.r: Unable to resolve account name.
|
140
|
-
at com.google.android.gms.drive.api.a.q.a(:com.google.android.gms:71)
|
141
|
-
at com.google.android.gms.common.service.f.run(:com.google.android.gms:176)
|
142
|
-
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
|
143
|
-
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
|
144
|
-
at com.google.android.gms.common.util.a.c.run(:com.google.android.gms:17)
|
145
|
-
at java.lang.Thread.run(Thread.java:856)
|
146
|
-
06-02 18:37:02.937 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
147
125
|
Caused by: java.lang.NullPointerException
|
148
126
|
at jp.co.hokkaido.nakafurano.hideo.kodama.vulkan.SelectActivity.onCreate(SelectActivity.java:55)
|
149
127
|
at android.app.Activity.performCreate(Activity.java:5104)
|
@@ -161,8 +139,102 @@
|
|
161
139
|
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
162
140
|
at dalvik.system.NativeStart.main(Native Method)```
|
163
141
|
|
142
|
+
###NullPointerExceptionについて(SelectActivity.java)
|
164
143
|
|
144
|
+
yonaさんのご指摘により、SelectActivityの56行目でNullPointerExceptionが発生しているようなので、コードを掲載しておきます。
|
145
|
+
```package jp.co.hokkaido.nakafurano.hideo.kodama.vulkan;
|
165
146
|
|
147
|
+
import android.app.Activity;
|
148
|
+
import android.content.Intent;
|
149
|
+
import android.content.res.Resources;
|
150
|
+
import android.graphics.Bitmap;
|
151
|
+
import android.graphics.BitmapFactory;
|
152
|
+
import android.graphics.Color;
|
153
|
+
import android.graphics.Point;
|
154
|
+
import android.os.Bundle;
|
155
|
+
import android.support.annotation.Nullable;
|
156
|
+
import android.view.Display;
|
157
|
+
import android.view.View;
|
158
|
+
import android.view.Window;
|
159
|
+
import android.view.WindowManager;
|
160
|
+
import android.widget.ImageButton;
|
161
|
+
import android.widget.LinearLayout;
|
162
|
+
import android.view.ViewGroup.LayoutParams;
|
163
|
+
import android.view.ViewGroup.MarginLayoutParams;
|
164
|
+
|
165
|
+
/**
|
166
|
+
* Created by hidemaru on 2016/03/25.
|
167
|
+
*/
|
168
|
+
public class SelectActivity extends Activity {
|
169
|
+
@Override
|
170
|
+
protected void onCreate(Bundle bundle){
|
171
|
+
super.onCreate(bundle);
|
172
|
+
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
173
|
+
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
174
|
+
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
175
|
+
|
176
|
+
Display display = this.getWindowManager().getDefaultDisplay();
|
177
|
+
Point p = new Point();
|
178
|
+
display.getSize(p);
|
179
|
+
|
180
|
+
LinearLayout linearLayout = new LinearLayout(this);
|
181
|
+
linearLayout.setOrientation(LinearLayout.VERTICAL);
|
182
|
+
linearLayout.setBackgroundColor(Color.argb(255, 100, 149, 237));
|
183
|
+
|
184
|
+
ImageButton imgMap = new ImageButton(this);
|
185
|
+
ImageButton imgLive = new ImageButton(this);
|
186
|
+
ImageButton imgAVS = new ImageButton(this);
|
187
|
+
|
188
|
+
Resources r = getResources();
|
189
|
+
Bitmap bmpM = BitmapFactory.decodeResource(r, R.drawable.vutton0);
|
190
|
+
imgMap.setImageBitmap(bmpM);
|
191
|
+
imgMap.setOnClickListener(new View.OnClickListener() {
|
192
|
+
@Override
|
193
|
+
public void onClick(View view) {
|
194
|
+
Intent intent = new Intent(SelectActivity.this,VolMap.class);
|
195
|
+
startActivity(intent);
|
196
|
+
}
|
197
|
+
});
|
198
|
+
LayoutParams lp = imgMap.getLayoutParams();
|
199
|
+
MarginLayoutParams mlpM = (MarginLayoutParams)lp;
|
200
|
+
mlpM.setMargins((p.x-60)/2,(p.y-272*3)/4,(p.x-60)/2,0);
|
201
|
+
imgMap.setLayoutParams(mlpM);
|
202
|
+
linearLayout.addView(imgMap);
|
203
|
+
//TODO continue this proccess
|
204
|
+
|
205
|
+
Resources r2 = getResources();
|
206
|
+
Bitmap bmpL = BitmapFactory.decodeResource(r2, R.drawable.vutton1);
|
207
|
+
imgLive.setImageBitmap(bmpL);
|
208
|
+
imgLive.setOnClickListener(new View.OnClickListener() {
|
209
|
+
@Override
|
210
|
+
public void onClick(View view) {
|
211
|
+
Intent intent = new Intent(SelectActivity.this,LiveCameraActivity.class);
|
212
|
+
startActivity(intent);
|
213
|
+
}
|
214
|
+
});
|
215
|
+
LayoutParams lp2 = imgLive.getLayoutParams();
|
216
|
+
MarginLayoutParams mlpL = (MarginLayoutParams)lp2;
|
217
|
+
mlpL.setMargins((p.x-60)/2,(p.y-272*3)/4,(p.x-60)/2,0);
|
218
|
+
imgLive.setLayoutParams(mlpL);
|
219
|
+
linearLayout.addView(imgLive);
|
220
|
+
|
221
|
+
Resources r3 = getResources();
|
222
|
+
Bitmap bmpA = BitmapFactory.decodeResource(r3,R.drawable.vutton2);
|
223
|
+
imgAVS.setImageBitmap(bmpA);
|
224
|
+
imgAVS.setOnClickListener(new View.OnClickListener() {
|
225
|
+
@Override
|
226
|
+
public void onClick(View view) {
|
227
|
+
}
|
228
|
+
});
|
229
|
+
LayoutParams lp3 = imgAVS.getLayoutParams();
|
230
|
+
MarginLayoutParams mlpA = (MarginLayoutParams)lp3;
|
231
|
+
mlpA.setMargins((p.x-60)/2,(p.y-272*3)/4,(p.x-60)/2,0);
|
232
|
+
imgAVS.setLayoutParams(mlpA);
|
233
|
+
linearLayout.addView(imgAVS);
|
234
|
+
}
|
235
|
+
}
|
236
|
+
```
|
237
|
+
|
166
238
|
###補足情報(環境)
|
167
239
|
OS OSX Yosemite 10.10.5
|
168
240
|
開発環境 Android studio 1.3.1
|
4
logcat追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -143,7 +143,23 @@
|
|
143
143
|
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
|
144
144
|
at com.google.android.gms.common.util.a.c.run(:com.google.android.gms:17)
|
145
145
|
at java.lang.Thread.run(Thread.java:856)
|
146
|
-
06-02 18:37:02.937 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
146
|
+
06-02 18:37:02.937 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
147
|
+
Caused by: java.lang.NullPointerException
|
148
|
+
at jp.co.hokkaido.nakafurano.hideo.kodama.vulkan.SelectActivity.onCreate(SelectActivity.java:55)
|
149
|
+
at android.app.Activity.performCreate(Activity.java:5104)
|
150
|
+
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
|
151
|
+
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2193)
|
152
|
+
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2310)
|
153
|
+
at android.app.ActivityThread.access$600(ActivityThread.java:169)
|
154
|
+
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1274)
|
155
|
+
at android.os.Handler.dispatchMessage(Handler.java:99)
|
156
|
+
at android.os.Looper.loop(Looper.java:137)
|
157
|
+
at android.app.ActivityThread.main(ActivityThread.java:5323)
|
158
|
+
at java.lang.reflect.Method.invokeNative(Native Method)
|
159
|
+
at java.lang.reflect.Method.invoke(Method.java:511)
|
160
|
+
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:974)
|
161
|
+
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
|
162
|
+
at dalvik.system.NativeStart.main(Native Method)```
|
147
163
|
|
148
164
|
|
149
165
|
|
3
logcatを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -120,6 +120,33 @@
|
|
120
120
|
}
|
121
121
|
```を追加してみましたが、変わりませんでした。
|
122
122
|
|
123
|
+
###logcat
|
124
|
+
```06-02 18:36:51.697 3772-20292/? E/ClientConnectionOperation﹕ Handling ConnectionFailedException
|
125
|
+
com.google.android.gms.drive.api.a.r: Unable to resolve account name.
|
126
|
+
at com.google.android.gms.drive.api.a.q.a(:com.google.android.gms:71)
|
127
|
+
at com.google.android.gms.common.service.f.run(:com.google.android.gms:176)
|
128
|
+
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
|
129
|
+
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
|
130
|
+
at com.google.android.gms.common.util.a.c.run(:com.google.android.gms:17)
|
131
|
+
at java.lang.Thread.run(Thread.java:856)
|
132
|
+
06-02 18:36:55.247 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
133
|
+
06-02 18:36:55.247 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
134
|
+
06-02 18:36:57.817 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
135
|
+
06-02 18:36:57.817 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
136
|
+
06-02 18:37:00.377 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
137
|
+
06-02 18:37:00.377 740-740/? E/Parcel﹕ Reading a NULL string not supported here.
|
138
|
+
06-02 18:37:01.717 3772-20298/? E/ClientConnectionOperation﹕ Handling ConnectionFailedException
|
139
|
+
com.google.android.gms.drive.api.a.r: Unable to resolve account name.
|
140
|
+
at com.google.android.gms.drive.api.a.q.a(:com.google.android.gms:71)
|
141
|
+
at com.google.android.gms.common.service.f.run(:com.google.android.gms:176)
|
142
|
+
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
|
143
|
+
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
|
144
|
+
at com.google.android.gms.common.util.a.c.run(:com.google.android.gms:17)
|
145
|
+
at java.lang.Thread.run(Thread.java:856)
|
146
|
+
06-02 18:37:02.937 740-740/? E/Parcel﹕ Reading a NULL string not supported here.```
|
147
|
+
|
148
|
+
|
149
|
+
|
123
150
|
###補足情報(環境)
|
124
151
|
OS OSX Yosemite 10.10.5
|
125
152
|
開発環境 Android studio 1.3.1
|
2
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
###Androidアプリ
|
1
|
+
###Androidアプリを実機でデバッグしていたら、「問題が発生したため、○○○○を終了します」と表示される。
|
2
2
|
JavaでAndroidアプリを開発しているのですが、カスタムビューでタッチイベントを受け取って、Intentを投げるプログラムをかいてデバッグしたところ、「問題が発生したため、○○○○を終了します」と表示されて、終了してしまうのですが、どうしたらよいでしょうか。
|
3
3
|
|
4
4
|
###発生している問題・エラーメッセージ
|
1
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|