PowerShell 을 사용하여 추천 합니다
Android Studio 터미널을 PowerShell로 설정하십시오.
Settings > Tools > Terminal > Shell path = pwsh.exe (instead of cmd.exe)
Android Studio에서 터미널 열기
PowerShell 7.0.1
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
PS >
adb.exe의 경로 테스트
# `pikachu` should be replace your username
PS > test-path "C:\Users\pikachu\AppData\Local\Android\sdk\platform-tools"
True
텍스트 편집기에서 powershell 프로파일 파일을여십시오
PS > notepad $profile
아래 줄을 추가하고 저장하고 종료하십시오.
# `pikachu` should be replaced with your username
$env:PATH+="C:\Users\pikachu\AppData\Local\Android\sdk\platform-tools"
터미널을 다시 열고 시도하십시오 adb
PS > adb
Android Debug Bridge version 1.0.41
Version 30.0.1-6435776
Installed as C:\Users\hdformat\AppData\Local\Android\sdk\platform-tools\adb.exe
global options:
-a listen on all network interfaces, not just localhost
-d use USB device (error if multiple devices connected)
-e use TCP/IP device (error if multiple TCP/IP devices available)
-s SERIAL use device with given serial (overrides $ANDROID_SERIAL)
-t ID use device with given transport id
-H name of adb server host [default=localhost]
-P port of adb server [default=5037]