我在4.2模拟器中卸载任何应用程序时得到NameNotFoundException。为什么在卸载时引发异常?
E / PackageInfoItemFactory(25967):getPackageInfoItem()NameNotFoundException E / PackageInfoItemFactory(25967):android.content.pm.PackageManager $ NameNotFoundException:com.winsland.zlibrary.ui.android E / PackageInfoItemFactory(25967):在android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:248) E / PackageInfoItemFactory(25967):at com.sec.android.app.controlpanel.PackageInfoItemFactory.updatePackageInfoItem(PackageInfoItemFactory.java:87) E / PackageInfoItemFactory(25967):at com.sec.android.app.controlpanel.PackageInfoItemFactory.updatePackageInfoItem(PackageInfoItemFactory.java:66) E / PackageInfoItemFactory(25967):at com.sec.android.app.controlpanel.PackageIntentReceiver.onReceive(PackageIntentReceiver.java:56) E / PackageInfoItemFactory(25967):在android.app.ActivityThread.handleReceiver(ActivityThread.java:2524) E / PackageInfoItemFactory(25967):在android.app.ActivityThread.access $ 1600(ActivityThread.java:159) E / PackageInfoItemFactory(25967):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1392) E / PackageInfoItemFactory(25967):在android.os.Handler.dispatchMessage(Handler.java:99) E / PackageInfoItemFactory(25967):在android.os.Looper.loop(Looper.java:137) E / PackageInfoItemFactory(25967):在android.app.ActivityThread.main(ActivityThread.java:5414) E / PackageInfoItemFactory(25967):at java.lang.reflect.Method.invokeNative(Native Method) E / PackageInfoItemFactory(25967):at java.lang.reflect.Method.invoke(Method.java:525) E / PackageInfoItemFactory(25967):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1187) E / PackageInfoItemFactory(25967):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) E / PackageInfoItemFactory(25967):at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
当找不到给定的包,应用程序或组件名称时,抛出此异常。 查看Android包管理器: http://developer.android.com/reference/android/content/pm/PackageManager.html