Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android: Failure [INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING]
Started by dyosua3 Feb 02 2013 10:47 AM

51 replies to this topic
[TOPIC CONTROLS]
Page 1 of 3 1 2 3
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

What would cause this error message?

This is what I'm getting in my terminal...

client-75-102-97-42:~ Dan$ /Users/Dan/Desktop/adt-bundle-mac-x86_64/sdk/platform-tools/adb -d install /Users/Dan/Desktop/gameName.apk
1306 KB/s (10373435 bytes in 7.754s)
pkg: /data/local/tmp/gameName.apk
Failure [INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING]

I am building for a device and not an emulator and just would like to test using the debug keystore.
I seem to missing the jarsigner and keytool utility files from my android sdk.
Any quick help would be very much appreciated!

DY
uid: 93901 topic_id: 35574 reply_id: 335574


[TOPIC: post.html]
#2

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

No ideas??
uid: 93901 topic_id: 35574 reply_id: 141909


[TOPIC: post.html]
#3

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

It sounds like your APK is being digitally signed by the JDK 7 instead of the JDK 6, which signs with an encryption that Android does not support. Android only supports the JDK 6.

I suggest that you downgrade your from JDK 7 to 6 according to Apple instructions here...
http://support.apple.com/kb/HT5559?viewlocale=en_US&locale=en_US

Then re-build your APK with the Corona Simulator and re-install it to your Android device.
uid: 32256 topic_id: 35574 reply_id: 141932


[TOPIC: post.html]
#4

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Also, you can verify which version of Java you are running by typing in the following using the Mac's Terminal window:
java -version


If it returns version 1.7, then that's the reason why it is signed wrong.
Android only supports Java version 1.6 (aka: Java 6).
uid: 32256 topic_id: 35574 reply_id: 141933


[TOPIC: post.html]
#5

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

It looks like I have 1.6.0_37. That should then work, correct? I have my project folder subdivided into folders for images and scripts. Would this cause any problems?
uid: 93901 topic_id: 35574 reply_id: 141937


[TOPIC: post.html]
#6

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Would you mind trying to sign the APK yourself? This is to verify that jarsigner works on your machine, because it sounds like it should. Just type in the following at the Terminal window...
jarsigner -keystore "./CoronaSDK/Resource Library/Android/debug.keystore"  androiddebugkey


After running the above, the jarsigner tool will ask for a password. The password for Corona's debug.keystore file is "android".

Next, try to install your APK onto your Android device. If it installs correctly, then it sounds like the Corona Simulator is signing it wrong. If it does not install, then we're having a problem with the jarsigner tool.
uid: 32256 topic_id: 35574 reply_id: 141988


[TOPIC: post.html]
#7

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

This is the error I got when I tried that...
dyosuas-macbook:~ Dan$ jarsigner -keystore "./CoronaSDK/Resource Library/Android/debug.keystore" /Users/Dan/Desktop/myGame.apk androiddebugkey

Enter Passphrase for keystore:

jarsigner error: java.lang.RuntimeException: keystore load: /Users/Dan/CoronaSDK/Resource Library/Android/debug.keystore (No such file or directory)
After attempting to install I obviously got the original error again. So an issue with the jarsigner tool then?
uid: 93901 topic_id: 35574 reply_id: 142018


[TOPIC: post.html]
#8

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Your path to the debug.keystore file is wrong. You need to set path...
>> "./CoronaSDK/Resource Library/Android/debug.keystore"
...to where you Corona SDK is located.
uid: 32256 topic_id: 35574 reply_id: 142046


[TOPIC: post.html]
#9

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

Sorry, I'm not so good with the terminal... One of those slashes was a backslash. Says, warning: the signer certificate has expired.
uid: 93901 topic_id: 35574 reply_id: 142048


[TOPIC: post.html]
#10

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

>> Says, warning: the signer certificate has expired.

Corona's "debug.keystore" has actually expired, so that's okay and normal. That warning won't prevent an Android device from installing the APK; only prevents you from publishing it. So, go ahead and try to install it on your device.
uid: 32256 topic_id: 35574 reply_id: 142049


[TOPIC: post.html]
#11

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

Unfortunately I'm getting the same error. Anything else I could have done wrong before this point?
uid: 93901 topic_id: 35574 reply_id: 142050


[TOPIC: post.html]
#12

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Bummer. This means that there is something wrong with your jarsigner. So, it's definitely a JDK issue. This is an easy issue to work-around on Windows, but I'm not quite sure what can be done on Mac.

I still suspect that you have JDK 7 on your Mac and the command line is grabbing its jarsigner tool instead. In your Finder window, try going to the following directory...
//System/Library/Java/JavaVirtualMachines

You should see a "1.6.0.jdk" file in that directory.
If you also see a "1.7.0.jdk" file, then that will be a problem.
uid: 32256 topic_id: 35574 reply_id: 142124


[TOPIC: post.html]
#13

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

There is only a 1.6.0...
uid: 93901 topic_id: 35574 reply_id: 142147


[TOPIC: post.html]
#14

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

I have access to another mac, which also has a windows 8 virtual machine. Can I use my corona license on either of these?
uid: 93901 topic_id: 35574 reply_id: 142153


[TOPIC: post.html]
#15

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Yes, you can install the Corona Simulator on up to 2 machines at a time. If you want to transfer your license from one machine to another, then you'll want to "deauthorize" from the old machine first via the Corona Simulator's "Preferences" window.
uid: 32256 topic_id: 35574 reply_id: 142174


[TOPIC: post.html]
#16

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

Once I got java on that virtual machine a few days ago and built, there were no problems then going to dropbox and downloading the apk.

Thanks for your continued help through this!
uid: 93901 topic_id: 35574 reply_id: 142804


[TOPIC: post.html]
#17

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Oh good! I'm glad you got it working!
uid: 32256 topic_id: 35574 reply_id: 142808


[TOPIC: post.html]
#18

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

Once I got java on that virtual machine a few days ago and built, there were no problems then going to dropbox and downloading the apk.

Thanks for your continued help through this!
uid: 93901 topic_id: 35574 reply_id: 142804


[TOPIC: post.html]
#19

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Oh good! I'm glad you got it working!
uid: 32256 topic_id: 35574 reply_id: 142808


[TOPIC: post.html]
#20

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

Hi again, we recently encountered an unrelated issue using windows. Using the latest public release of Corona on both mac and windows, we get a runtime error on windows, that we don't get on mac running the exact same project. Anyway I'll create a separate thread for that issue if I can't fix this problem instead.  Any other ideas of how to fix the jarsigner issue? There is no "1.7.0.jdk" in the folder: //System/Library/Java/JavaVirtualMachines.'s>

 

Could it be anywhere else?

 

Thanks.



[TOPIC: post.html]
#21

dyosua3

[GLOBAL: userInfoPane.html]
dyosua3
  • Enthusiast

  • 42 posts
  • Corona SDK

... Also I just tried building a sample app with the adk, and was able to do that successfully. I did have to generate a new debug.keystore to build with eclipse, and I know you said that that shouldn't be the problem, but tried using that key anyway, and it didn't work. Any ideas?



[TOPIC: post.html]
#22

stephen.raymundo

[GLOBAL: userInfoPane.html]
stephen.raymundo
  • Observer

  • 7 posts
  • Corona SDK

I'm really sorry for necroposting but, was there any solution to this? I was using this normally till a few days ago then I can't install the apk anymore, it gives me Failure [INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING]



[TOPIC: post.html]
#23

jen.looper

[GLOBAL: userInfoPane.html]
jen.looper
  • Contributor

  • 164 posts
  • Corona SDK

Suddenly I'm encountering this error as well...



[TOPIC: post.html]
#24

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,925 posts
  • Enterprise

It really helps when you have a problem like this to let us know what version of Corona you are running and what Operating system you're running it on.

 

Also have you checked to make sure your JDK is correct?

 

Are you signing with the debug key or a release keystore?



[TOPIC: post.html]
#25

jen.looper

[GLOBAL: userInfoPane.html]
jen.looper
  • Contributor

  • 164 posts
  • Corona SDK

Sure. I'm signing with my release keystore which has worked until just now. I'm on Build: 2013.1137 and Mac OSX 10.8.4. My java version is 1.6.0_51. Trying to install to my Samsung Galaxy SII

 

thanks,

Jen




[topic_controls]
Page 1 of 3 1 2 3
 
[/topic_controls]