新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > win8下Android SDK環(huán)境變量安裝

win8下Android SDK環(huán)境變量安裝

作者: 時間:2016-09-12 來源:網(wǎng)絡(luò) 收藏

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,這時候會出現(xiàn)閃退,再在解壓之后的SKD文件夾里搜索 android.bat , 雙擊運行,這時候應(yīng)該就會出現(xiàn)正常的程序窗口了

到此win8下安裝 android sdk和環(huán)境變量的配置就結(jié)束了。


上一頁 1 2 下一頁

關(guān)鍵詞:

評論


相關(guān)推薦

技術(shù)專區(qū)

關(guān)閉