Impossible to install SDK r17 on win 7 x64

"Failed to find Java version for 'C:\Windows\system32\java.exe"问题的解决方法

OS: Windows 7 x86 64bit
JDK installed: http://download.oracle.com/otn-pub/java/jdk/7u3-b05/jdk-7u3-windows-x64.exe

Option #1
Execute Android SDK installer 
http://dl.google.com/android/installer_r17-windows.exe

Actual result - it can not find JAVA on the system.

Environment variable JAVA_HOME, PATH and recommendation from different forums about registry key didn't help (like here http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/)

Option #2
Execute tools/android.bat from 
http://dl.google.com/android/android-sdk_r17-windows.zip

Actual result:
Failed to start with the error in console: "Failed to convert path to a short DOS path: C:\Windows\system32\java.exe"

How I fixed this: 
In the file android-sdk-windows\tools\lib\find_java.bat 
-for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
+for /f %%a in ('%~dps0\find_java.exe') do set java_exe=%%a

Suggestions - it is obvious that find_java.exe has a bug in conversion long names to short one (at least if no any conversion is required)

红字部分为解决方法,这种方法需要使用zip包的Android SDK,而不能使用exe格式的,然后在android-sdk-windows\tools\lib\find_java.bat

文件中:

-for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
+for /f %%a in ('%~dps0\find_java.exe') do set java_exe=%%a

然后再运行android.bat就可以了。

[Android] "Failed to find Java version for 'C:\Windows\system32\java.exe"的更多相关文章

  1. 安装Android Studio报failed to find java version for 'C:\windows\system32\java.exe':[2] The system cannot find the specified file.错误的解决方案

    方案很简单,找到SYSTEM32目录下的java.exe文件,重命名为java.exe.orj. 方案出处:http://stackoverflow.com/questions/10339679/an ...

  2. python+appium 【已解决】真机运行appium报错“WebDriverException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c.......详见内文

    问题报错提示: selenium.common.exceptions.WebDriverException: Message: A new session could not be created. ...

  3. [Maven - Java Version] 如何设置Maven的Java版本或者使用不同的JDK版本编译

    In pom.xml, defined this maven.compiler.source properties to tell Maven to use Java 8 to compile the ...

  4. jdk1.7安装,cmd下 java -version出现错误:“could not open `D:\Java\jre7\lib\amd64\jvm.cfg”

    cmd 下java -version出现错误:“could not open `D:\Java\jre7\lib\amd64\jvm.cfg”,出现这种错误可能是由于先前有安装老版本jdk,之后将新版 ...

  5. ubuntu系统中java -version所显示的版本与/etc/profile中配置的$JAVA_HOME的关系

    问题产生 ubuntu 18.04环境下,执行 java -version 发现与/etc/profile中的$JAVA_HOME所设置的java版本不同. 推测原因 最近用apt install 安 ...

  6. (转)win下修改jdk环境变量后,java版本不变 java -version

    背景:在windows下安装了多个版本的jdk,发现修改环境变量无法切换. win 7环境下修改JAVA_HOME后,在命令行执行:java -version 发现版本没有变化,以为需要重启才行,就把 ...

  7. 解决 :java -version出现错误:“could not open `C:\Program Files\Java\jre7\lib\amd64\jvm.cfg”

    cmd 下java -version出现错误:“could not open `C:\Program Files\Java\jre7\lib\amd64\jvm.cfg”,出现这种错误可能是由于先前有 ...

  8. How to change java version in Linux

    How to change default Java version on Linux Posted on November 1, 2015 by Dan Nanni Leave a comment ...

  9. windows server 2008 应用程序池自动关闭 C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load

    Sign In Join Search IIS Home Downloads Learn Reference Solutions Blogs Forums HomeIIS.NET Forums64-b ...

随机推荐

  1. BZOJ2064: 分裂

    2064: 分裂 Time Limit: 10 Sec  Memory Limit: 64 MBSubmit: 360  Solved: 220[Submit][Status][Discuss] De ...

  2. ARM处理器简介

    参考: http://www.arm.com/zh/products/processors/instruction-set-architectures/index.php 1.ARM核演变图 2.AR ...

  3. UVa 10653 - Bombs! NO they are Mines!!

    题目大意:给你一个二维迷宫,给定入口和出口,找出最短路径. 无权图上的单源最短路,用BFS解决. #include <cstdio> #include <queue> #inc ...

  4. iOS 界面布局,设置约束

    1. 设置控件的宽度是父视图的宽度的1/2 在控件上按住ctrl,按住鼠标左键,拖动到父视图,这时出来一个选项,选中aspect 在Multiplier中填上1:2 即可,其它的比例也是这样 2. 设 ...

  5. eclipse中创建类和方法自动注释

    <?xml version="1.0" encoding="UTF-8"?><templates><template autoin ...

  6. Centos下关于ssh、scp与rsync设置与应用

    最近应公司要求,需要对文件数据进行远程传输与备份操作,特此写了一篇文章记录下了关于ssh.scp以及rsync的应用配置全过程,可能过程太过罗嗦,但主要就是想在不遗漏每个过程的情况下对此进行阐述,希望 ...

  7. sql相关语言

    SQL 掌握一门编程语言: C C++ Java C# ... 数据库 数据结构/算法 链表 队列 栈 数组 面向对象 网络 (界面.业务逻辑) 关系型数据库: 以二维表的形式组织数据 表.索引.视图 ...

  8. jquery proxy

    slice = Array.prototype.slice,// Bind a function to a context, optionally partially applying any // ...

  9. 3. 托管对象模型的迁移(Core Data 应用程序实践指南)

    本章介绍如何添加模型版本及模型映射,演示几种迁移技术,供在升级模型时使用. 3.1. 修改托管对象模型 3.2. 添加模型版本 3.3. 轻量级迁移方式 3.4. 默认的迁移方式 3.5. 通过迁移管 ...

  10. 上传预览 easyui部分控件获取focuse 表单验证

    js: $(document).ready(function () { //$('#creater').combobox({ // url: '/VMS.UI/BindData/ScheamData? ...