麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > WEB開發 > 正文

win8下Android SDK環境變量安裝

2024-04-29 21:00:57
字體:
來源:轉載
供稿:網友
一:
下載 Android SDK
http://developer.android.com/sdk/index.html
這里有兩種,一種是下載“ADT Bundle for Windows” ,這是個已經集成好的Eclipse開發環境,已經配置好所有的東西,只需要做安裝JDK和配置環境變量。
還有一種就是自己有Eclipse只是想單獨下載Android SDK的。這種情況請選擇“USE AN EXISTING IDE”,下載SDK Tools For Windows。

二:安裝Android SDK
這里我解壓下載的:ADT Bundle for Windows文件得到:adt-bundle-windows-x86_64-20130522目錄
選擇好安裝目錄,一路下一步就行了,注意:如果你沒有配置JAVA_HOME環境變量,Android SDK安裝檢測可能會報錯。
配置Android SDK環境變量,這個是一個很容易出錯的地方,如果只是下載了“ADT Bundle for Windows”,沒有配置這個環境變量的話,那么在啟動虛擬機AVD的時候可能會出錯。
ANDROID_SDK_HOME:設置你Android SDK的安裝目錄就行了。我的是:D:/Android/android-sdk
PATH:把“%ANDROID_SDK_HOME%/tools;%ANDROID_SDK_HOME%/platform-tools;” 添加到系統環境變量path下。
三:在adt-bundle-windows-x86_64-20130522目錄下運行SDK Manager.exe
發現:

WIN8下的Android SDK 秒退了

解決辦法: 找到Android SDK的安裝目錄下 android-sdk-windows/tools/lib/find_java.bat批處理文件,備份一下。(隨便重命名,更改后綴格式)。 
然后新建同名格式文件,將以下內容粘貼復制,保存即可。 
然后,啟動 SDK Manager ,可以打開窗口。

把find_java.bat中全部替換成下面的:
@echo off
rem Copyright (C) 2007 The Android Open Source Project
rem
rem Licensed under the Apache License, Version 2.0 (the "License");
rem you may not use this file except in compliance with the License.
rem You may obtain a copy of the License at
rem
rem      http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
 
rem This script is called by the other batch files to find a suitable Java.exe
rem to use. The script changes the "java_exe" env variable. The variable
rem is left unset if Java.exe was not found.
 
rem Useful links:
rem Command-line reference:
rem   http://technet.microsoft.com/en-us/library/bb490890.aspx
 
rem Check we have a valid Java.exe in the path. The return code will
rem be 0 if the command worked or 9009 if the exec failed (program not found).
rem Java itself will return 1 if the argument is not understood.
set java_exe=java.exe
rem search it in the path and verify we can execute it
for %%a in (%java_exe%) do set java_exe=%%~s$PATH:a
if not exist %java_exe% goto SearchForJava
%java_exe% -version 2>nul
if ERRORLEVEL 1 goto SearchForJava
goto :SearchJavaW
 
 
rem ---------------
:SearchForJava
rem We get here if the default %java_exe% was not found in the path.
rem Search for an alternative in %ProgramFiles%/Java/*/bin/java.exe
 
echo.
echo WARNING: Java not found in your path.
 
rem The strategy is to look for Java under these 3 locations:
rem - %ProgramFiles%, which may point to either a 32-bit or 64-bit install
rem                   depending on the current invocation context
rem - %ProgramW6432%, which points to a 32-bit install. This may not be defined.
rem - %ProgramFiles(x86)%, which points to a 64-bit install. This may not be defined.
 
if not defined ProgramFiles goto :Check64
echo Checking if Java is installed in %ProgramFiles%/Java.
 
set java_exe=
for /D %%a in ( "%ProgramW6432%/Java/*" ) do call :TestJavaDir "%%a"
if defined java_exe goto :SearchJavaW
 
rem Check for the "default" 64-bit version if it's not the same path
:Check64
if not defined ProgramW6432 goto :Check32
if "%ProgramW6432%"=="%ProgramFiles%" goto :Check32
echo Checking if Java is installed in %ProgramW6432%/Java instead (64-bit).
 
set java_exe=
for /D %%a in ( "%ProgramW6432%/Java/*" ) do call :TestJavaDir "%%a"
if defined java_exe goto :SearchJavaW
 
rem Check for the "default" 32-bit version if it's not the same path
:Check32
if not defined ProgramFiles(x86) goto :CheckFailed
if "%ProgramFiles(x86)%"=="%ProgramFiles%" goto :CheckFailed
echo Checking if Java is installed in %ProgramFiles(x86)%/Java instead (32-bit).
 
set java_exe=
for /D %%a in ( "%ProgramFiles(x86)%/Java/*" ) do call :TestJavaDir "%%a"
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=%~1/bin/java.exe
set short_path=%~s1/bin/java.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
 
到此win8下安裝 android sdk和環境變量的配置就結束了。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 午夜亚洲影院 | 国产一区二区视频在线播放 | 中文字幕 欧美 日韩 | 亚洲国产一区二区三区 | 免费黄色在线观看网站 | 视频一区国产精品 | 久久国产中文 | 精品国产91久久久久久久妲己 | 欧美高清另类自拍视频在线看 | 黑人三级毛片 | 欧美精品成人一区二区三区四区 | sese在线视频| 久草最新| 中文字幕1区2区 | 亚洲免费视频大全 | 免费在线观看毛片 | 欧美视屏一区二区 | 精国产品一区二区三区四季综 | 国产婷婷一区二区三区 | www.国产一区.com | 免费一级a毛片免费观看 | 国产精品99久久久久久久女警 | 欧美日韩国产一区二区三区在线观看 | 香蕉国产9| 日本残忍极度灌浣肠视频 | 国产成人精品区 | 久久精国 | 精品一区二区久久久久久按摩 | 成人三区四区 | 成人精品一区二区 | 久久色在线 | 被啪羞羞视频在线观看 | 在线a毛片免费视频观看 | 国产午夜免费福利 | 国产精品午夜一区 | 亚洲网站在线 | 97zyz成人免费视频 | 中文字幕视频在线播放 | 国产精品一区二区三区在线播放 | 欧美视频一区二区三区在线观看 | 欧美激情图区 |