2015年11月4号 运行中的package报错处理

来源:互联网 发布:优易淘宝小号 编辑:程序博客网 时间:2024/06/06 04:31
 1.虽然水平一般。但是感觉有的时候,一些bug如果真的不懂的话。还是去谷歌吧。哦对了。天朝不能用谷歌。所以。自己想办法咯。另外,找到问题。还是别用翻译软件了。。。这个。程序猿们,你们懂的。
2.记录今天遇到我一个小小的问题。困扰很久。也不算小问题。反正我是各种百度了。各种csdn了。找到的答案总是牛头不对马嘴。
问题如下:Unable to get package info for com.zdnews; is package not installed?
首先想到的是application 里面是不是没有配置好name的路径,后来发觉。根本就不是路径的问题。所以。方案一,失败。
其次,想到的百度和CSDN上面的大神。于是,答案如下:这个问题引起原因是 简单的卸载app 没有卸载干净,然后再次运行,当dalvik重新安装。apk文件并试图重用以前的活动从同一个包    实在是没有理解这句话的意思。所以方案二 失败。(eclipse 里面重新运行,哪里来的dalvik 没有卸载干净一说。。。。反正是不理解这句话,博主肯定没有认真看下,app安卓的几种方式,我指的是底层安装方式)
----------------------------------------------------- Good Boy---------------------------------------------------------------
正解来了。国外的小哥这么解释的,我就直接copy了

I think this happens when you run the app from eclipse while you already have the previous version installed ? This won't happen if you uninstall the app before running it again from eclipse. Also, this won't cause any problems.

shareimprove this answer
answered Jun 26 '14 at 9:21
Shivam Verma
4,0151719



i see i will try uninstalling the app and be back on you..im just worried if it will affect the performance of my app because i see a lot of 06-26 05:06:24.280: I/Choreographer(3193): Skipped 115 frames! The application may be doing too much work on its main thread. this line in my logcat..doing too much work thing – GiantJun 26 '14 at 9:23
1
stackoverflow.com/a/11329209/1239966 – Shivam Verma Jun 26 '14 at 9:25
1
in case you are doing any of the above mentioned tasks, do them on a background thread so that the ui is not blocked. – Shivam Verma Jun 26 '14 at 9:30
1
So this reading from the database will take some time, minimal but it will and skipping frames could be caused by this. If you move the reading from database to a background thread, your problem of frames being skipped will mostly be solved :) – Shivam VermaJun 26 '14 at 9:35
1
yep. You can fetch database values in doInBackground(). – Shivam VermaJun 26 '14 at 9:39
 大概解释下。意思就是说。这小哥也解释了卸载不干净一说,但是意思说这种可能比较小。有种可能就是你在Appliaction中做了某些耗时的动作。这个在刚安装的时候。这是不被允许的。耗时动作是要在后台。而不是主线程。so~~~~ 搞定。之前测试数据的时候。很贱的在Application中去获取设备信息。实在作死。
末尾附上链接:http://stackoverflow.com/questions/24426635/caused-by-java-lang-illegalstateexception-package-not-installed
========= 碎觉。
0 0
原创粉丝点击