Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So, thanks to a series of quick participation at <a href="http://goo.gl/b7slO" rel="nofollow">StackOverflow.com</a> and at <a href="http://goo.gl/FFYHp" rel="nofollow">Android-Developer-googleGroup</a>, now the solution is clear..... let me give a rundown of how I resolved it, <strong>in case any of you are having a similar problem</strong>.</p> <p>my android developer <strong>debug.keystore</strong> file is in the following location in my linux</p> <pre><code>~/.android/debug.keystore </code></pre> <p>then i <code>cd ~</code> and followed the steps as mentioned in the Google Projects for Android page for <a href="http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint" rel="nofollow">Obtaining a Maps API Key</a> to get the md5 fingerprint of my debug.keystore</p> <pre><code>rakib@rakib-laptop:~$ \ &gt; keytool \ &gt; -list \ &gt; -alias androiddebugkey \ &gt; -keystore ~/.android/debug.keystore \ &gt; -storepass android \ &gt; -keypass android </code></pre> <p>but it returned a stupid frustrating error</p> <pre><code>list: unrecognized option '-keypass' list: Try 'list -help' for more information </code></pre> <p>and that's when i started all the forums and discussions etc. but didn't find the right solution. After several forum posts, I figured that my simple call to <strong>keytool</strong> is referring to <strong><em>an unwanted keytool - a keytool that appears to be from the GNU Compiler for Java. Android rather requires the keytool from Sun/Oracle Java</em></strong></p> <p>Hence, i did the following to find out all the instance of different keytool programs that i have in my linux system.</p> <pre><code>rakib@rakib-laptop:~$ locate keytool </code></pre> <p>and it gave me the following list</p> <pre><code>/etc/alternatives/keytool /etc/alternatives/keytool.1.gz /home/rakib/java-WTK-2.5.2/bin/mekeytool /usr/bin/gkeytool-4.4 /usr/bin/keytool /usr/lib/jvm/java-1.5.0-gcj-4.4/bin/keytool /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/bin/keytool /usr/lib/jvm/java-1.5.0-gcj-4.4/man/man1/keytool.1.gz /usr/lib/jvm/java-6-sun-1.6.0.24/bin/keytool /usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/keytool /usr/lib/jvm/java-6-sun-1.6.0.24/jre/man/ja/man1/keytool.1.gz /usr/lib/jvm/java-6-sun-1.6.0.24/jre/man/man1/keytool.1.gz /usr/lib/jvm/java-6-sun-1.6.0.24/man/ja/man1/keytool.1.gz /usr/lib/jvm/java-6-sun-1.6.0.24/man/man1/keytool.1.gz /usr/share/man/man1/gkeytool-4.4.1.gz /usr/share/man/man1/keytool.1.gz /var/lib/dpkg/alternatives/keytool </code></pre> <p>Bingo!!! so many keytool instances have been located. now I need to use the one in Java-6-sun JRE. So, <strong><em>cd</em></strong> to that directory as found from the <strong>locate keytool</strong> command above</p> <pre><code>rakib@rakib-laptop:~$ cd /usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/ </code></pre> <p>now that the terminal is inside the <strong><em>java-6-sun/jre/bin</em></strong> directory, i typed the following command - remember that my debug.keystore file was in <strong>~/.android/debug.keystore</strong> ?</p> <pre><code>rakib@rakib-laptop:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin$ \ &gt; ./keytool \ &gt; -list -alias androiddebugkey \ &gt; -keystore ~/.android/debug.keystore \ &gt; -storepass android \ &gt; -keypass android </code></pre> <p>and voila..... that returned the MD5 fingerprint of my android debug certificate that i was looking for.</p> <pre><code>androiddebugkey, Mar 19, 2011, PrivateKeyEntry, Certificate fingerprint (MD5): 08:A6:77:9C:97:66:CA:00:B9:6B:82:6B:37:64:B8:14 </code></pre> <p>Notice that when i was typing keytool command from the java-6-sun/jre/bin folder, you <strong>must not write JUST "keytool"</strong>. you <strong>must instead write "./keytool"</strong> - with a period and a slash to imply that you are referring to the keytool inside <strong>the current directory</strong> where the terminal is.</p> <pre><code>rakib@rakib-laptop:~$ WooooooHooooooooooooooo!!!!! </code></pre> <p><em><strong>PostNote:</em></strong> this problem of executing the wrong keytool was happening because my java-6-sun JRE was not the <strong>default java environment</strong> in my ubuntu. rather my GNU java compiler was set as the default java environment. in order to change the default Java environment in your linux machine, see the <a href="https://help.ubuntu.com/community/Java" rel="nofollow">Ubuntu Community Help for Java</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload