2014-07-25 4 views

답변

53

아마 SDK/도구 폴더의 모든 내용과 같이 누락 잘?

이 문제를 해결하는 가장 좋은 방법은 sdk/temp 폴더로 이동하는 것입니다. "tools_r24.0.1-windows"와 같은 이름의 zip 파일을 찾을 수 있습니다 (버전 번호는 다를 수 있음)

어딘가에 복사하여 압축을 풉니 다. 압축을 푼 폴더 안에 당신은 SDK에 폴더가 '도구'

복사라는 이름의 폴더가 있습니다 /와/SDK에

그리고 짜잔를 현재의 도구 폴더를 교체! SDK 및 AVD가 다시 작동하고 모든 가상 장치가 복원됩니다!

+5

내 도구 다운로드가 부분적으로 실패했습니다. 업데이트를 다시 실행하고 다운로드가 성공했지만 도구 디렉토리가 다른 응용 프로그램에서 사용 중이기 때문에 업데이트가 중단되었습니다. 모든 것을 종료하고 조사 할 때 지원 디렉토리를 제외하고 내 도구 디렉토리가 비어있는 것으로 나타났습니다. 내 temp 폴더에서 tools 디렉토리를 추출하는 것이 트릭을 만들었습니다. 감사! – markproxy

+4

천국에서 보낸 천사 천사 –

+0

@Sndn이 녀석은 아주 아주 많이 사용합니다. 정말 고맙습니다. –

4

는 Android.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 Useful links: 
rem Command-line reference: 
rem http://technet.microsoft.com/en-us/library/bb490890.aspx 

rem don't modify the caller's environment 
setlocal 

rem Set up prog to be the path of this script, including following symlinks, 
rem and set up progdir to be the fully-qualified pathname of its directory. 
set prog=%~f0 

rem Grab current directory before we change it 
set work_dir=%cd% 

rem Change current directory and drive to where the script is, to avoid 
rem issues with directories containing whitespaces. 
cd /d %~dp0 


rem Check we have a valid Java.exe in the path. 
set java_exe= 
call lib\find_java.bat 
if not defined java_exe goto :EOF 

set jar_path=lib\sdkmanager.jar;lib\swtmenubar.jar 

rem Set SWT.Jar path based on current architecture (x86 or x86_64) 
for /f "delims=" %%a in ('"%java_exe%" -jar lib\archquery.jar') do set swt_path=lib\%%a 

:MkTempCopy 
    rem Copy android.bat and its required libs to a temp dir. 
    rem This avoids locking the tool dir in case the user is trying to update it. 

    set tmp_dir=%TEMP%\temp-android-tool 
    xcopy %swt_path% %tmp_dir%\%swt_path% /I /E /C /G /R /Y /Q > nul 
    copy /B /D /Y lib\common.jar   %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\commons-codec*  %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\commons-compress* %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\commons-logging* %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\dvlib.jar   %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\guava*    %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\httpclient*  %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\httpcore*   %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\httpmime*   %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\layoutlib-api.jar %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\org-eclipse-*  %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\sdk*    %tmp_dir%\lib\  > nul 
    copy /B /D /Y lib\swtmenubar.jar  %tmp_dir%\lib\  > nul 

    rem jar_path and swt_path are relative to PWD so we don't need to adjust them, just change dirs. 
    set tools_dir=%cd% 
    cd /d %tmp_dir% 

:EndTempCopy 

rem The global ANDROID_SWT always override the SWT.Jar path 
if defined ANDROID_SWT set swt_path=%ANDROID_SWT% 

if exist "%swt_path%" goto SetPath 
    echo ERROR: SWT folder '%swt_path%' does not exist. 
    echo Please set ANDROID_SWT to point to the folder containing swt.jar for your platform. 
    goto :EOF 

:SetPath 
rem Finally exec the java program and end here. 
REM set REMOTE_DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 
call "%java_exe% %REMOTE_DEBUG%" "-Dcom.android.sdkmanager.toolsdir=%tools_dir%" "-Dcom.android.sdkmanager.workdir=%work_dir%" -classpath "%jar_path%;%swt_path%\swt.jar" com.android.sdkmanager.Main %* 

rem EOF 
+0

이를 사용하지 않은,하지만 내 옆에 옵션 했. 감사합니다 –

10

내가 가진 최고의 솔루션 만부터 SDK 도구를 다운로드 할 수 있습니다 :.. http://developer.android.com/sdk/index.html

-> 기타 다운로드 옵션 ->를 SDK 도구 영문 -> 안드로이드-sdk_r24 * * - windows.zip . 그리고 필요한 도구가있는 SDK 위치로 압축을 푸십시오.

+0

이것은 Visual Studio 2017 Community Edition에서 저에게 효과적이었습니다. * tools * 디렉토리가 누락되었습니다. –

+0

이 답변은 크게 과소 평가되었습니다. 나 자신에게이 문제가 생겼다. 나는'25.2.5' ->'26.1.1' 업그레이드를 시도하고있었습니다. 도구 폴더가 있지만 다른 많은 부분이 누락되었습니다. 도구 만 다운로드하여 C : \ Program Files (x86) \ Android \ android-sdk \ tools'에 압축을 푼 다음 VS를 다시 시작했습니다. – melwil

0

Android Studio 번들 (android-studio-bundle-143.2915827-windows.exe)을 다운로드 한 다음 7Zip으로 열었고 $ TEMP 디렉토리에 android-sdk.7z 파일이 있습니다. 압축을 풀고 도구 폴더를 다시 복사했습니다.

삭제 방법은 확실하지 않지만이 HiDpi 화면 중 하나가 있는데 SDK 관리자를 열었을 때 "업데이트"버튼을 클릭하면 전체 단어를 볼 수 없으며 실제로는 "삭제"버튼입니다. 도구가 자동 삭제를 할 수 있습니다 나를 넘어 아주 이유

.....

Android SDK Manager - see buttons at bottom right