Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors running builder 'Android Package Builder' on project 'HelloAndroid'. sun/security/x509/X500Name

I just installed Eclipse-Classic 3.7.2 and android SDK. Also installed/configured eclipse with ADT plugin.

Now after following the steps in http://developer.android.com/resources/tutorials/hello-world.html to create a "Hello World" application I tried to run the application in Android Emulator. But this is throwing an error

Errors occurred during the build. Errors running builder 'Android Package Builder' on project 'HelloAndroid'. sun/security/x509/X500Name

Can you please explain me what am I doing wrong here, or what do I need to fix for this error.

Thank you Zeeshan

like image 515
Zeeshan Rang Avatar asked May 21 '12 11:05

Zeeshan Rang


1 Answers

In my case, the ADT plugin was trying to use keytool utility present in JVM which launched eclipse. Which was IBM JDK, this failed as keytool which comes with IBM JDK is incompatible with the Sun version -- it has its a syntax that doesn't match the Google documentation, and it automatically creates the keystore file in ~/.keystore (without actually telling you where it was created).

Below solution worked for me:
1. Install sun jvm
2. From terminal execute: eclipse -vm path_to_sun_java/javaw

Instead of step 2, you can edit eclipse.ini to tell which jvm to use (ref eclipse.ini)

-vm
/usr/lib/sunjdk/bin/javaw
like image 186
pushkarajthorat Avatar answered Nov 14 '22 22:11

pushkarajthorat