您的位置 首页 报告

win8下Android SDK环境变量装置

一:下载 Android SDKhttp://developer.android.com/sdk/index.html这里有两种,一种是下载“ADT Bundle for Windows&

一:下载 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

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/ceping/baogao/299348.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部