15
Situation
I’m getting this kind of mistake in mine logcat and I don’t know exactly what it could be. Although this error is not compromising the operation of the application (as far as it is perceived) being compiled from the Eclipse, the project is still running normally. This project is not Google Play Store, but it has a version control server. Whenever a new version of the application is generated, it automatically receives a notification stating that it has this new version to be installed.
Message
java.lang.RuntimeException: Unable to instantiate
application android.app.Application:
java.lang.IllegalStateException: Unable to get package info for br.com.meuapp;
is package not installed?
Moment of error
The error appears exactly after compiling the code to generate a new .apk
for reinstallation using USB Debug.
Environment Settings
- IDE: Eclipse Mars 2
- SDK Target: Android 2.3.3 - Api Level 10
- Test Device: Smartphone Lenovo Vibe A7010
Observing
The permission is being used in the project INSTALL_PACKAGES
which by default displays an error message that can only be compiled if you run the CLEAN of the project.
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
Permission is only granted to system apps
Doubts
I need these doubts to be clarified in relation to the error, because it can happen some crash in another device that is not the test.
What is the cause of this error? What can happen if the error persists? How to fix this error?
It already happened to me, and I decided to go on Build/Clean Project, so IDE realoca everything in its proper place.
– Leonardo Dias
@Leonardodias Did you do this in Android Studio? I use Eclipse, which in this case would be equivalent Project/Clean... but does not solve the problem! It happens exactly when the application is open using USB Debug, then I run to install again. Then logcat shows the error message.
– viana
Are you even facing this problem or copied the question from here?
– ramaral
@ramaral if I say it’s the two options you believe? Well, when I ask a question, the normal is to do a search. I found some things that did not convince me in the understanding. So I made the debt two others to mine too. But in short, I am really with this problem. However as it is not affecting my project, I decided to have a little more patience.
– viana
Yes I do. Is there anything else you can add to the question? Do you have any suspicion of what it might be?
– ramaral
@ramaral I edited the question by inserting the Moment of error. I don’t have much more detail at hand.
– viana
@I improved the text to better understand the issue. From what I understand, maybe it has something to do with the version control of the application. But I’m not sure! So I’m still doing research to solve the problem so I don’t have any headaches in the future.
– viana
I found a question in stackoverflow similar, according to the answer accepts if Voce uninstall the smartphone app before having the eclipse run the error does not occur.
– Icaro Martins
@seamusd the solution proposed in the global Stack Overflow has worked and you just want to understand why the solution is that or not yet solved the darn error?
– José
@Jose the problem still occurs in my application. I wanted to understand why it occurs, if it is a bug from the IDE; if the occurrence is exactly related to the application; or even if it is by the device.
– viana