简体   繁体   English

Android-如何从命令行在模拟器上运行本地应用程序?

[英]Android - how to run a local app on an emulator from a command line?

I am trying to run the NOOK emulator. 我正在尝试运行NOOK模拟器。 It is a tablet from Barnes and Noble. 它是Barnes and Noble的平板电脑。

Here is the command I am trying: 这是我正在尝试的命令:

C:\Program Files (x86)\Android\android-sdk\add-ons\addon-nooksdk-nook-15\skins>emulator-arm -avd BNTV600 -skin NOOKcolor -skindir
"C:\Program Files (x86)\Android\android-sdk\add-ons\addon-nookcolor-barnes_and_noble_inc-8\skins

I am not certain which directory I need to be in so that the command is recognized. 我不确定我需要位于哪个目录中才能识别命令。 The error I get is this: 我得到的错误是这样的:

'emulator-arm' is not recognized as an internal or external command,
operable program or batch file.

Also, how do I tell it which .apk to use? 另外,如何告诉它使用哪个.apk? I have more than one apk 我有多个apk

Thank you!! 谢谢!!

$ adb shell am
usage: am [start|instrument]
       am start [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]
                [-c <CATEGORY> [-c <CATEGORY>] ...]
                [-e <EXTRA_KEY> <EXTRA_VALUE> [-e <EXTRA_KEY> <EXTRA_VALUE> ...]
                [-n <COMPONENT>] [-D] [<URI>]
       ...

Source : Instrumentation Testing . 资料来源: 仪器测试

And you can also check the documentation of ADB for the various options. 您也可以查看ADB文档以了解各种选项。

Have a look at this question on StackOverflow . 看一下StackOverflow上的这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM