Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>YMMV, but <strong>in addition</strong> to editing android.bat, as described in the previous answer, I still couldn't get the SDK Manager to run on Windows 8 64-bit, until I first:</p> <ul> <li>uninstalled ALL versions of Java</li> <li><strong>rebooted*</strong></li> <li>installed ONLY the X86 JDK (including the Public JRE option in the installer)</li> </ul> <p>I had tried all of these things and more previously *WITHOUT rebooting, and this was the only way I ever got the SDK Manager to run. Hopefully this info saves you from some of the utter frustration and wasted time I experienced. What a pain in the ass just to get the tools running out of the box. Awful experience.</p> <p>I would have replied as a comment to the previous answer, but apparently I don't have enough rep to do that: <a href="https://meta.stackexchange.com/questions/25725/how-do-you-comment-on-a-specific-answer">https://meta.stackexchange.com/questions/25725/how-do-you-comment-on-a-specific-answer</a></p> <p><strong>EDIT: More complete answer below. (I don't think rebooting had anything to do with it.)</strong></p> <p>There appear to be several ways to launch the SDK Manager:</p> <ol> <li><code>SDK Manager.exe</code> in the root of the Android SDK.</li> <li><code>SDK Manager.exe</code> in <code>sdk\tools\lib</code> of the Android SDK.</li> <li><code>Window -&gt; Android SDK Manager</code> menu in Eclipse</li> <li><code>android.bat</code> in <code>sdk\tools</code> of the Android SDK.</li> </ol> <p>In my case, it looks like <code>android.bat</code> fails on the line:</p> <pre><code>for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a </code></pre> <p>As far as what that line is doing... if I manually run: <code>"[path_to_java]java" -jar lib\archquery.jar</code></p> <p>It successfully returns: <code>x86_64</code></p> <p>But when the batch file runs that same command, I don't know why but it fails with the error message:</p> <pre><code>Unable to access jarfile lib\archquery.jar </code></pre> <p>So the variable <code>swt_path</code> gets set to an empty string. Everything breaks down from there.</p> <p>The batch file sets the correct value for the variable <code>java_exe</code>. Others have commonly reported this as a problem, but those workarounds weren't relevant in my case.</p> <p>People have recommended commenting out the problem line by adding REM to the beginning of it, and adding a line to manually set the <code>swt_path</code> variable, which is a valid workaround:</p> <pre><code>REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a set swt_path=lib\x86 </code></pre> <p><strong>BUT</strong>, the critical issue in my case is that it's choosing to load a jar file from either the <code>lib\x86</code> or the <code>lib\x86_64</code> folder here. At some point, things were getting confused between the BAT file error, a 32-bit JDK, and a 64-bit Android SDK.</p> <p><strong>SO</strong>, the workaround in my case was to:</p> <ol> <li>Uninstall ALL versions of Java</li> <li>Install the JDK <ul> <li>You can either use the 32-bit Android SDK and install the 32-bit JDK</li> <li>Or use the 64-bit Android SDK and install the 64-bit JDK </li> <li>But the "bitness" of the JDK should match the Android SDK. It appears that either of the 32-bit or the 64-bit will work on a 64-bit computer, AS LONG AS the JDK bitness matches the Android SDK bitness.</li> </ul></li> <li><p>Edit "android.bat"</p> <ul> <li><p>If using the 32-bit Android SDK/JDK, use <code>lib\x86</code>:</p> <pre><code>REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a set swt_path=lib\x86 </code></pre></li> <li><p>If using the 64-bit Android SDK/JDK, use <code>lib\x86_64</code>:</p> <pre><code>REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a set swt_path=lib\x86_64 </code></pre></li> </ul></li> </ol> <p>After doing this, I can successfully run the SDK Manager by running <code>android.bat</code>, or from the Eclipse menu (but still not by running either of the <code>SDK Manager.exe</code> files directly).</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