Android 安装 apk ,找不到 adb 命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11272608/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing apk , adb command not found
提问by William Kinaan
I want to install apk on my emulator, I found this page how to install apkand This thread
我想在我的模拟器上安装 apk,我找到了这个页面如何安装 apk和这个线程
and my problem is when I type adb in my command line I got this:
我的问题是当我在命令行中输入 adb 时,我得到了这个:
'adb' is not recognized as an internal or external commands
i set the path
on windows advance, the path is the tool director in my sdk directory
, I mean the path I set is C:\Program Files (x86)\Android\android-sdk\tools
, I am working on windows 7
我path
在windows上设置了advance,路径是我的工具目录sdk directory
,我的意思是我设置的路径是C:\Program Files (x86)\Android\android-sdk\tools
,我在windows 7上工作
回答by Bobs
First add your Android SDK path like "C:\Android\android-sdk\platform-tools"
to your OS path
首先将您的 Android SDK 路径添加"C:\Android\android-sdk\platform-tools"
到您的操作系统路径中
Second use this command to restart adb:
其次使用此命令重新启动 adb:
adb kill-server
adb start-server
回答by Khan
1 StepIf u have multiple emulator than close all emulator and open emulator by Window--> AVD Manger --> and select any one emulator on which u want to install apk and start that emulator by clicking on Strat
1 步骤如果你有多个模拟器而不是关闭所有模拟器并通过窗口打开模拟器--> AVD Manger --> 并选择您想要安装 apk 的任何一个模拟器并通过单击 Strat 启动该模拟器
2 StepOpen Command Promotand enter path upto folder Platform-toolsof android sdk somethiing like cd C:\Program Files (x86)\Android\android-sdk\platform-toolsif 64 bit other wise C:\Program Files\Android\android-sdk\platform-tools
2 步骤打开Command Promot并输入android sdk文件夹Platform-tools的路径,例如 cd C:\Program Files (x86)\Android\android-sdk\platform-tools如果是 64 位,则为C:\Program Files\Android\ android-sdk\平台工具
3 Stepadb install Path Upto ur apk means path in which folder u have put apk Example adb install C:\User\Download\facebook.apk
3 步adb install Path Upto ur apk 表示您放置 apk 的文件夹路径示例adb install C:\User\Download\facebook.apk
回答by Pargat
Try this
尝试这个
First chage your current directory to platform-tools
首先将当前目录更改为 platform-tools
cd C:\Program Files\Android\android-sdk\platform-tools
Then install your apk on emulator
然后在模拟器上安装你的apk
adb install "<Path to your apk file>"
for example
例如
adb install "c:\Apps\abc.apk"
回答by Aathi
For Mac Users
对于 Mac 用户
Go to the
/Users/your-user-name/Library/Android/sdk/platform-tools
directory./adb your-command(Ex: ./adb devices )
进入
/Users/your-user-name/Library/Android/sdk/platform-tools
目录./adb your-command(例如: ./adb devices )
回答by Danieldms
For me it's work perfect
对我来说这是完美的工作
Go to folder android installation Go to platform-tools and try the below command
转到文件夹 android 安装转到平台工具并尝试以下命令
./adb reverse tcp:8081 tcp:8081
after Running your app
运行您的应用程序后
回答by zishe
For Mac - add next line to bash/zsh config file:
对于 Mac - 将下一行添加到 bash/zsh 配置文件:
export PATH="$HOME/Library/Android/sdk/platform-tools:$PATH"
回答by Leo
In my case, I had %LOCALAPPDATA%\Android\Sdk\platform-tools
in my System Pathwith no luck.
就我而言,我 %LOCALAPPDATA%\Android\Sdk\platform-tools
在我的系统路径中没有运气。
I moved it to my User Pathand it worked perfectly.
我将它移动到我的用户路径,它运行得很好。
P.S. I personally use https://rix0rrr.github.io/WindowsPathEditor/, very straight forward and clean.
PS 我个人使用https://rix0rrr.github.io/WindowsPathEditor/,非常直接和干净。
回答by K_Anas
add
添加
C:\Android\android-sdk\platform-tools
and
和
C:\Android\android-sdk\platform-tools
to your Path Environment Variables
到您的路径环境变量
回答by Rinkal Bhanderi
Try changing it to
尝试将其更改为
From
从
C:\Program Files (x86)\Android\android-sdk\tools
C:\Program Files (x86)\Android\android-sdk\tools
To
到
C:\Program Files (x86)\Android\android-sdk\platform-tools
C:\Program Files (x86)\Android\android-sdk\platform-tools
If doesn't work then you mught need to restart you system too.
如果不起作用,那么您也必须重新启动系统。
回答by Kirtikumar A.
Start terminal and write below command
启动终端并写入以下命令
For MAC
对于 MAC
./adb kill-server
./adb start-server
For Windows
对于 Windows
adb kill-server
adb start-server