---
title: "adb 不是内部命令"
author: "feargod"
date: "2012-05-03T23:56:17Z"
tags: ["“'adb' 不是内部或外部命令", "也不是可运行的程序或批处理文件。”"]
categories: ["移动开发"]
slug: "adb"
draft: false
lastmod: "2012-05-03T23:56:17Z"
id: 1510616
url: "https://feargod.iteye.com/blog/1510616"
---

在android模拟器上安装apk文件时，根据网上的提示，把apk文件放在sdk安装目录的tools文件夹下，然后运行cmd，到tools文件目录下。adb install aaa.apk。结果“'adb' 不是内部或外部命令，也不是可运行的程序或批处理文件。”
后来发现tools文件夹中并没有adb.ext这个文件。但是有一个adb_has_moved.txt，里面的内容是“If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"

Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.”
新版的sdk，adb移到了platform-tools文件夹下。把apk文件放到platform-tools文件夹中，然后命令行进入platform-tools目录，执行adb install aaa.apk就可以了。