1、android.content.pm.PackageManager$NameNotFoundException
这个是因为安装的应用程序,不完整,apk有问题导致。
下载的时候出异常的话写一个接口。有一个回调。
出错了,怎么处理。
从arraylist删除
D/PackageManager( 1991): generateServicesMap(android.accounts.AccountAuthenticat or): 5 services unchanged W/System.err(19190): android.content.pm.PackageManager$NameNotFoundException: co m.trustgo.security W/System.err(19190): at android.app.ApplicationPackageManager.getPackageInfo( ApplicationPackageManager.java:78) W/System.err(19190): at com.trustgo.addon.dolphin.scan.z.b(Unknown Source) W/System.err(19190): at com.trustgo.addon.dolphin.scan.BootReceiver.onReceive (Unknown Source) W/System.err(19190): at android.app.ActivityThread.handleReceiver(ActivityThr ead.java:2119) W/System.err(19190): at android.app.ActivityThread.access$1500(ActivityThread .java:123) W/System.err(19190): at android.app.ActivityThread$H.handleMessage(ActivityTh read.java:1197) W/System.err(19190): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err(19190): at android.os.Looper.loop(Looper.java:137) W/System.err(19190): at android.app.ActivityThread.main(ActivityThread.java:4 424) W/System.err(19190): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(19190): at java.lang.reflect.Method.invoke(Method.java:511) W/System.err(19190): at com.android.internal.os.ZygoteInit$MethodAndArgsCalle r.run(ZygoteInit.java:787) W/System.err(19190): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja va:554) W/System.err(19190): at dalvik.system.NativeStart.main(Native Method) W/System.err(19190): android.content.pm.PackageManager$NameNotFoundException: co m.trustgo.security.beta W/System.err(19190): at android.app.ApplicationPackageManager.getPackageInfo( ApplicationPackageManager.java:78) W/System.err(19190): at com.trustgo.addon.dolphin.scan.z.b(Unknown Source) W/System.err(19190): at com.trustgo.addon.dolphin.scan.BootReceiver.onReceive (Unknown Source) W/System.err(19190): at android.app.ActivityThread.handleReceiver(ActivityThr ead.java:2119) W/System.err(19190): at android.app.ActivityThread.access$1500(ActivityThread .java:123) W/System.err(19190): at android.app.ActivityThread$H.handleMessage(ActivityTh read.java:1197) W/System.err(19190): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err(19190): at android.os.Looper.loop(Looper.java:137) W/System.err(19190): at android.app.ActivityThread.main(ActivityThread.java:4 424) W/System.err(19190): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(19190): at java.lang.reflect.Method.invoke(Method.java:511) W/System.err(19190): at com.android.internal.os.ZygoteInit$MethodAndArgsCalle r.run(ZygoteInit.java:787) W/System.err(19190): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
2、 java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131493171, class android.widget.ListView) with Adapter
这个问题出现在onresume的时候使用AsyncTask,点击item到下一个界面,按back返回的时候,出现bug。
这个修改的时候加个判断当adpter不为空时notifyDataSetChanged,为空的时候就重新new.
3、
String abcname = "abc"; Cursor c = db.query("table", new String[]{age, agender,heighth}, "name"+"=?", new String[]{abcname}, null, null, null);