从命令提示符安装 apk 文件? [英] Install an apk file from command prompt?

查看:47
本文介绍了从命令提示符安装 apk 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Windows 命令行安装文件.首先,我想在编译所有 .jar 文件后构建,以便在不使用 Eclipse 的情况下为 Android 应用程序创建一个 .apk 文件.

I want to install a file using the Windows command line. First I want to build after compiling all the .jar files to create an .apk file for an Android application without using Eclipse.

有谁知道如何在不使用 Eclipse & 的情况下完成此操作?只能通过使用命令行.

Does anyone know how this can be done without the use of Eclipse & only by making use of command line.

推荐答案

您可以使用下面的代码从命令行安装应用程序

You can use the code below to install application from command line

adb install example.apk

这个apk安装在当前打开的模拟器的内存中.

this apk is installed in the internal memory of current opened emulator.

adb install -s example.apk

这个apk安装在当前打开的模拟器的sd卡中.

this apk is installed in the sd-card of current opened emulator.

您还可以将 apk 安装到 adb 的已连接设备列表中的特定设备.

You can also install an apk to specific device in connected device list to the adb.

adb -s emulator-5554 install myapp.apk

另请参阅adb 帮助了解其他选项.

Refer also to adb help for other options.

这篇关于从命令提示符安装 apk 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆