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. iOS纯代码手动适配 分类: ios技术 2015-05-04 17:14 239人阅读 评论(0) 收藏

    首先说下让自己的程序支持iPhone6和6+,第一种使用官方提供的launch screen.xib,这个直接看官方文档即可,这里不再多述:第二种方法是和之前iPhone5的类似,比较简单,为iPho ...

  2. UILabel自适应高度

    在网上看了一些,发现很多关于自适应高度的,不能用,就在下面写一种我常用的吧!保证可以直接粘贴复制到Xcode中运行. UILabel *label = [[UILabel alloc] init]; ...

  3. C# 计算文件的HASH

    /// <summary> /// 提供用于计算指定文件哈希值的方法 /// <example>例如计算文件的MD5值: /// <code> /// String ...

  4. IOS开发-UI学习-UINavigationController(导航控制器)的使用

    UINavigationController是IOS 中常用的功能,基本用法如下: 1.在AppDelegate.m中添加如下代码: #import "AppDelegate.h" ...

  5. svn 安装网站

    1.svn插件 http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240

  6. http://begin.lydsy.com/JudgeOnline/problem.php?id=2770(PKU2503 Babelfish)

    2770: PKU2503 Babelfish Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 2  Solved: 2[Submit][Status][ ...

  7. xamarin mac 之 资料

    中文社区 xamarin.form 30天学习计划

  8. 9.TCP:传输控制协议

    1.TCP功能     TCP向应用层提供面向连接的.可靠的字节流服务.TCP可以认为是一个没有选择确认或否认的滑动窗口协议.     TCP将用户数据打包构成报文段:它发送数据后启动一个定时器:另一 ...

  9. Variation of e.touches, e.targetTouches and e.changedTouches

    We have the following lists: touches: A list of information for every finger currently touching the ...

  10. [UT]Unit Test理解

    Coding中有一个原则:Test Driven Development.  UT中的一些基本概念: 1. 测试驱动 2. 测试桩 3. 测试覆盖 4. 覆盖率 单体测试内容: 1. 模块接口:测试模 ...