adb 명령을 찾을 수 없습니다
브라우저를 사용하여 전화로 입력 할 수 adb forward
있는 ezkeyboard 응용 프로그램을 사용하려면 명령 을 실행해야 합니다.
adb forward tcp:8080 tcp:8080
명령을 실행 하면 adb command not found
오류 메시지가 나타납니다.
android
터미널에서 명령을 실행할 수 있습니다 . 왜 adb
작동하지 않습니까?
adb
사용자의 $ PATH 변수 에 있는지 확인하십시오 .
또는
로 찾아서 whereis
실행할 수 있습니다../adb
내 경우에는 Android Studio 1.1.0 경로는 다음과 같습니다.
/Users/wzbozon/Library/Android/sdk/platform-tools
에 다음을 추가하십시오 ~/.bash_profile
export PATH=~/Library/Android/sdk/tools:$PATH
export PATH=~/Library/Android/sdk/platform-tools:$PATH
Mac 10.11.1을 사용하고 있으며 Android Studio 1.5를 사용하고 있습니다. adb "/ Users / user-name / Library / Android / sdk / platform-tools"
이제 bash_profile을 편집하십시오.
emacs ~/.bash_profile
이 줄을 bash_profile에 추가하고 사용자 이름을 사용자 이름으로 바꿉니다.
export PATH="$PATH:/Users/user-name/Library/Android/sdk/platform-tools"
저장하고 닫습니다. 이 명령을 실행하여 bash_profile을 다시로드하십시오.
source ~/.bash_profile
android-sdks / tools / adb_has_moved.txt 파일에서 :
adb 도구가 platform-tools /로 이동했습니다.
SDK에이 디렉토리가 표시되지 않으면 SDK 및 AVD 관리자 (Android 도구 실행)를 시작하고 "Android SDK Platform-tools"를 설치하십시오.
또한 platform-tools / 디렉토리를 포함하도록 PATH 환경 변수를 업데이트하여 어느 위치에서나 adb를 실행할 수 있습니다.
따라서 UNIX에서 다음과 같은 작업을 수행하십시오.
export PATH=$PATH:~/android-sdks/platform-tools
adb가 설치되어 있습니까? 확인하려면 터미널에서 다음 명령을 실행하십시오.
~/Library/Android/sdk/platform-tools/adb
출력이 인쇄되면 다음 설치 단계를 건너 뛰고 최종 터미널 명령 I 목록으로 바로 이동하십시오.
- Android Studio 시작
- 도구-> Android-> SDK 관리자를 통해 SDK 관리자 시작
- Android SDK 플랫폼 도구 확인
Mac에서 다음 명령을 실행하고 터미널 세션을 다시 시작하십시오.
echo export "PATH=~/Library/Android/sdk/platform-tools:$PATH" >> ~/.bash_profile
이것이 가장 쉬운 방법이며 자동 업데이트를 제공합니다.
사제 설치
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
adb 설치
brew cask install android-platform-tools
adb 사용 시작
adb devices
Mac 사용자는 /Users/(USERNAME)/.bash_profile
이 파일을 편집기에서 엽니 다 .
이 줄을 추가하여 경로를 추가하십시오.
export PATH="/Users/myuser/Library/Android/sdk/platform-tools":$PATH
studio를 통해 adb를 설치하는 경우 이것이 기본 경로입니다. 이 줄에서 사용자 이름을 변경하는 것을 잊지 마십시오.
내 Mac (OS X 10.8.5)에서는 여기에 adb가 있습니다.
~/Library/android-sdk-mac_86/platform-tools
그래서 $PATH
당신 .bash_profile
과 source
그것을 편집하십시오 .
터미널을 시작할 때마다 $ PATH 변수를 다시 쓰지 않으 려면 홈 디렉토리 ( ~ / )에서 .bash_profile (Mac의 경우 .profile ) 파일을 편집 하고 파일의 어딘가에 export 문을 넣으십시오 .
이제 터미널을 시작할 때마다 $ PATH 변수가 올바르게 업데이트됩니다. 프로파일 파일을 수정 한 직후에 터미널 환경을 업데이트하려면 다음을 입력하십시오.
source ~/.profile
PATH
변수 를 편집하지 않으려면가 설치된 platform-tools
디렉토리로 이동 SDK
하여 명령이 있습니다.
다음과 같이 사용할 수 있습니다.
다음 위치에있는 디렉토리로 이동하십시오
SDK
.cd /Users/mansour/Library/Developer/Android/sdk/platform-tools
adb
명령을 입력하여./
현재 디렉토리에서 사용하십시오../adb tcpip 5555
./adb devices
./adb connect 192.168.XXX.XXX
+ 그 이유는 : 당신이 잘못된 디렉토리에 있습니다 (adb executor가 포함되어 있지 않음을 의미합니다).
+ 해결책은 (단계적으로)입니다.
1) adb가 설치된 위치를 찾으십시오 . 사용중인 OS에 따라 다릅니다.
맥 : " ~/Library/Android/sdk/platform-tools
"
또는
Window, it could be in: "%USERPROFILE%\AppData\Local\Android\sdk\platform-tools\
".
However, in case you could NOT remember this such long directory, you can quickly find it by the command "find
". Try this in your terminal/ command line, "find / -name "platform-tools" 2> /dev/null
" (Note: I didn't test in Window yet, but it works with Mac for sure).
*Explain the find command,
- Please note there is a space before the "/" character --> only find in User directory not all the computer.
- "
2> /dev/null
" --> ignore find results denied by permission. Try the one without this code, you will understand what I mean.
2) Go to where we installed adb. There are 3 ways mentioned by many people:
Change the PATH global param (which I won't recommend) by: "
export PATH=~/Library/Android/sdk/platform-tools
" which is the directory you got from above. Note, this command won't print any result, if you want to make sure you changed PATH successfully, call "export | grep PATH
" to see what the PATH is.Add more definition for the PATH global param (which I recommend) by: "
export PATH=~/Library/Android/sdk/platform-tools:$PATH
" or "export PATH=$PATH:~/Library/Android/sdk/platform-tools
"Go to the path we found above by "
cd ~/Library/Android/sdk/platform-tools
"
3) Use adb:
If you change or update the PATH, simply call any adb functions, since you added the PATH as a global param. (e.g: "
adb devices
")If you go to the PATH by
cd
command, call adb functions with pre-fix "./
" (e.g: "./ adb devices
")
nano /home/user/.bashrc
export ANDROID_HOME=/psth/to/android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
However, this will not work for su/ sudo. If you need to set system-wide variables, you may want to think about adding them to /etc/profile, /etc/bash.bashrc, or /etc/environment.
ie:
nano /etc/bash.bashrc
export ANDROID_HOME=/psth/to/android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
in my case I added the following line in my terminal:
export PATH="/Users/Username/Library/Android/sdk/platform-tools":$PATH
make sure that you replace "username" with YOUR user name.
hit enter then type 'adb' to see if the error is gone. if it is, this is what you should see: Android Debug Bridge version 1.0.40
...followed by a bunch of commands..and ending with this: $ADB_TRACE comma-separated list of debug info to log: all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwp $ADB_VENDOR_KEYS colon-separated list of keys (files or directories) $ANDROID_SERIAL serial number to connect to (see -s) $ANDROID_LOG_TAGS tags to be used by logcat (see logcat --help)
if you get that, run npm run android again and it should work..
UNABLE TO LOCATE ADB #SOLVED Simply Download Sdk platform tools.https://developer.android.com/studio/releases/platform-tools.html Extract the Downloaded file. Go to Sdk Manager in Android Studio and copy the link. Go to file Explorer and paste the path for Sdk you copied to view the Sdk files. You will notice that the Adb file is missing, open downloaded file (platform tools) copy contents and replace every content in your Sdk tool file (the file where you noticed adb is missing)and save. You are good to go.
I solved this issue by install adb package. I'm using Ubuntu.
sudo apt install adb
I think this will help to you.
In my case, I was in the platform-tools
directory but was using command in the wrong way:
adb install
instead of the right way:
./adb install
In my case this is the solving of this problem
Make sure you have installed the android SDK. Usually the location of SDK is located to this location
/Users/your-user/Library/Android/sdk
After that cd to that directory.
Once you are in that directory type this command ./platform-tools/adb install your-location-of apk
if youd dont have adb in folder android-sdk-macosx/platform-tools/
you should install platform tools first. Run android-sdk-macosx/tools/android
and Install platform tools from Android SDK manager.
Type the below command in terminal:
nano .bash_profile
And add the following lines (replace USERNAME with your own user name).
export ANDROID_HOME=/Users/USERNAME/Library/Android/sdk export PATH=${PATH}:${ANDROID_HOME}/tools export PATH=${PATH}:${ANDROID_HOME}/platform-tools
Close the text editor, and then enter the command below:
source .bash_profile
참고URL : https://stackoverflow.com/questions/10303639/adb-command-not-found
'Programming' 카테고리의 다른 글
숫자를 월 이름으로 변환하는 스위치 케이스 블록을 줄이는 방법은 무엇입니까? (0) | 2020.07.29 |
---|---|
adb 명령을 찾을 수 없습니다 (0) | 2020.07.29 |
Eclipse가 시작되지 않고 아무것도 변경하지 않았습니다. (0) | 2020.07.29 |
유효한 캐시 경로를 제공하십시오 (0) | 2020.07.29 |
Rails 3에서 네비게이션에 "현재"클래스를 추가하는 가장 좋은 방법 (0) | 2020.07.29 |