新闻中心

EEPW首页 > 嵌入式系统 > 设计应用 > win8下Android SDK环境变量安装

win8下Android SDK环境变量安装

作者: 时间:2016-09-12 来源:网络 收藏

if defined java_exe goto :SearchJavaW

:CheckFailed

echo.

echo ERROR: No suitable Java found. In order to properly use the Android Developer

echo Tools, you need a suitable version of Java JDK installed on your system.

echo We recommend that you install the JDK version of JavaSE, available here:

echo http://www.oracle.com/technetwork/java/javase/downloads

echo.

echo You can find the complete Android SDK requirements here:

echo http://developer.android.com/sdk/requirements.html

echo.

goto :EOF

rem ---------------

:TestJavaDir

rem This is a subrountine for the for /D above. It tests the short version

rem of the %1 path (i.e. the path with only short names and no spaces).

rem However we use the full version without quotes (e.g. %~1) for pretty print.

if defined java_exe goto :EOF

set full_path=%~1binjava.exe

set short_path=%~s1binjava.exe

%short_path% -version 2>nul

if ERRORLEVEL 1 goto :EOF

set java_exe=%short_path%

echo.

echo Java was found at %full_path%.

echo Please consider adding it to your path:

echo - Under Windows XP, open Control Panel / System / Advanced / Environment Variables

echo - Under Windows Vista or Windows 7, open Control Panel / System / Advanced System Settings / Environment Variables

echo At the end of the Path entry in User variables, add the following:

echo ;%full_path%

echo.

goto :EOF

rem ---------------

:SearchJavaW

rem Called once java_exe has been set. Try to see if we can find a javaw

rem to use. If not, we'll default to using java_exe.

for %%a in (%java_exe%) do set p=%%~pa

for %%a in (%java_exe%) do set n=%%~na

for %%a in (%java_exe%) do set x=%%~xa

set n=%n:java=javaw%

set javaw_exe=%p%%n%%x%

if not exist %javaw_exe% set javaw_exe=%java_exe%

goto :EOF

闪退的解决办法二:

先用管理员身份运行SDK Manager.exe,这时候会出现闪退,再在解压之后的SKD文件夹里搜索 android.bat , 双击运行,这时候应该就会出现正常的程序窗口了

到此win8下安装 android sdk和环境变量的配置就结束了。


上一页 1 2 下一页

关键词:

评论


相关推荐

技术专区

关闭