2011-11-04 173 views
0

我正在開發智能研究應用程序,我在恢復活動時遇到任何問題。活動從列表的數據庫中獲取一些數據,並且還有其他視圖。 現在我的問題 - 如果我在這種情況下(與主頁按鈕)關閉(隱藏)此應用程序,運行任何其他應用程序(例如發送短信),然後當我回到我的正在運行的應用程序有一個大錯誤。我不知道問題出在哪裏(調試不起作用)。請幫忙。Android:恢復應用程序

下面是從日誌中的錯誤:

11-04 16:03:58.270: ERROR/kernel(130): [115047.678649] init: untracked pid 1183 exited 
11-04 16:04:12.660: ERROR/jdwp(1276): Failed sending reply to debugger: Broken pipe 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276): FATAL EXCEPTION: main 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276): java.lang.NullPointerException 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at cz.android.zkouseni.VyberLekce$AdapterVyberLekce.getView(VyberLekce.java:262) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.AbsListView.obtainView(AbsListView.java:1519) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.ListView.makeAndAddView(ListView.java:1749) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.ListView.fillDown(ListView.java:674) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.ListView.fillFromTop(ListView.java:731) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.ListView.layoutChildren(ListView.java:1602) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.AbsListView.onLayout(AbsListView.java:1349) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.view.View.layout(View.java:7320) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.RelativeLayout.onLayout(RelativeLayout.java:912) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.view.View.layout(View.java:7320) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.FrameLayout.onLayout(FrameLayout.java:342) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.view.View.layout(View.java:7320) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.widget.FrameLayout.onLayout(FrameLayout.java:342) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.view.View.layout(View.java:7320) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.view.ViewRoot.performTraversals(ViewRoot.java:1162) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1882) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.os.Handler.dispatchMessage(Handler.java:99) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.os.Looper.loop(Looper.java:130) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at android.app.ActivityThread.main(ActivityThread.java:3701) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at java.lang.reflect.Method.invokeNative(Native Method) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at java.lang.reflect.Method.invoke(Method.java:507) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) 
11-04 16:04:12.961: ERROR/AndroidRuntime(1276):  at dalvik.system.NativeStart.main(Native Method) 
11-04 16:06:51.880: ERROR/ServiceLocator(1412): ServiceLocator$VoipServiceConnection.onServiceConnected ext: [email protected] 
11-04 16:08:10.580: ERROR/ActivityThread(1506): Failed to find provider info for com.maxmpz.audioplayer 

回答

0

你越來越在行262 inisde適配器的getView方法的空指針。這意味着您要將數據放入數據的視圖爲空,或者您正在使用的某個數據點由於某種原因從數據庫返回null。

發佈您的適配器的代碼,幷包含一條評論,指出哪一行是262,它將更容易爲您提供更具體的幫助。

+0

問題解決了。謝謝 :) – AdaMoOo