How rectify Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] and ?

edited February 2014 in Android Mode

So I am having issues again. 2 issues to be exact.

My hard drive on my mac died and had to be replaced. So with my new drive in, I reinstalled Processing 2.0.3 along with Android mode (i was having issues with Android mode on the newest version on Processing- one problem at a time here). Everything works when I run android apps on the emulator, but I'd like to install them on my phone to test.

So I tried to install a simple app I wrote that simply shows the screen width, height and frame rate (it was a lesson i was teaching myself). This app was already on my phone, so when I tried to reinstall it, I got the following error:

failure install_parse_failed_inconsistent_certificates

Doing some research, it doesn't seem to like that it's the same app being installed from a different (or what it sees as a different) machine. forum.processing.org/one/topic/preemptive-tip.html

So I uninstalled the app from the phone, but with no luck to reinstall back on it. And I have to stop for the day.

So this morning, it won't even connect with the phone. Trying to install the same app and I get this:

Lost connection with device while launching. Try again.

So i tried again. And again. Turned the phone off and back on. Same with Processing and even rebooted the mac. No luck. Same error as above.

Figuring it was maybe the app, I wrote a simple "Hello World" app (actually it's called whyWontThisWork) and still get the "Lost connection error".

I haven't changed anything on my phone. It's an HTC EVO LTE. Debugging in on. I was able to install just fine before my mac died and got a new drive.

I'm stuck.

Thoughts?

Thanks in advance!

`Shields

Answers

  • Answer ✓

    Uninstalling the sketch is the correct solution to this problem.

    When you install the Android SDK, it automatically makes a debug certificate for you. The debug certificate is used to sign all APKs that are built in debug mode (including Processing sketches). When your hard drive died and you reinstalled the SDK, it generated a new debug certificate. When you tried to install the same sketch on your phone, the debug certificates weren't the same... and so Android complained about it (hence the error message).

    This problem is most likely out of the way for now. My guess as to why you can't install the sketch now is that you haven't properly reinstalled the device drivers (but it's a Mac, so it should just work... right?). At this point in time, you need to troubleshoot ADB...

    From a command line (Terminal on Mac, I think...), run adb devices. If your device doesn't show up, or it shows up as "offline", then you have a driver problem. If it shows up as "online", then it should work and you probably just have to restart Processing...

    That's the general idea. From there, getting into drivers is kind of messy... but you've already gone through the process before, so it shouldn't be too difficult (and you have a Mac). You need to think back to when you first got Android mode working and what you did to get it to work...

  • edited February 2014

    Uninstalling the sketch is the correct solution to this problem.

    When you install the Android SDK, it automatically makes a debug certificate for you. The debug certificate is used to sign all APKs that are built in debug mode (including Processing sketches). When your hard drive died and you reinstalled the SDK, it generated a new debug certificate. When you tried to install the same sketch on your phone, the debug certificates weren't the same... and so Android complained about it (hence the error message).

    This problem is most likely out of the way for now.

    Worked perfect. Thank you for the explanation- now i know why.

    My guess as to why you can't install the sketch now is that you haven't properly reinstalled the device drivers (but it's a Mac, so it should just work... right?)

    My ass (to the mac/just works). Lol. To illustrate my point. Yesterday, I didn't have time to work on this issue since I wasn't home all day. This morning, fire it up, try to install- works. What the hell? I rebooted it on Saturday. Restarted everything. And today; plug it and and boom- installs. Both programs too. The whyWontThisWork (title edited to remove frustration profanity) AND the old screenSize program, after uninstalling the one from my phone as you explained. This machine will be the end of my sanity.

    I don't get it. So, again, to

    (but it's a Mac, so it should just work... right?)

    i say, my ass. lol

    Thanks for your help.

Sign In or Register to comment.