0
사용자로부터 오류 보고서가 표시되고 코드에 무슨 문제가 있는지 잘 모릅니다. 로그 캣은 이것이다 :runOnUiThread의 Nullpointerexception
java.lang.NullPointerException
at com.laurenswuyts.find.it.MainActivity$LoadPlaces$1.run(MainActivity.java:299)
at android.app.Activity.runOnUiThread(Activity.java:4244)
at com.laurenswuyts.find.it.MainActivity$LoadPlaces.onPostExecute(MainActivity.java:293)
at com.laurenswuyts.find.it.MainActivity$LoadPlaces.onPostExecute(MainActivity.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:602)
at android.os.AsyncTask.access$600(AsyncTask.java:156)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4697)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
그리고이 코드 조각에 관하여 :
이protected void onPostExecute(String file_url) {
// dismiss the dialog after getting all products
pDialog.dismiss();
// updating UI from Background Thread
runOnUiThread(new Runnable() {
public void run() {
/**
* Updating parsed Places into LISTVIEW
* */
// Get json response status
String status = nearPlaces.status;
// Check for all possible status
if(status.equals("OK")){
// Successfully got places details
if (nearPlaces.results != null) {
// loop through each place
for (Place p : nearPlaces.results) {
이 사람이 나를 도울 수 있습니까? 나는이 라인이기 때문에
MainActivity의 299 행을 표시 할 수 있습니까? – WarrenFaith
또한 스택 추적에 따라 줄 번호를 참조하지 않고 말할 수 없습니다. 내 생각 엔 "상태"null이 될 것입니다,하지만 또한이 엿볼을 기반으로 nearPlaces 수 있습니다. MainActivity 299에는 무엇이 있습니까? –
@ syb0rg 신경 쓰지 마세요, 미안 해요 :) – WarrenFaith