Installing an apk on android emulator on Mac OS

I tried following these steps(from here):

go to sdk folder, then go to tools.
copy your apk file inside the tool directory
./emulator -avd myEmulator
to run the emulator on mac 
./adb install myApp.apk
to install app on the emulator

But when I run "./emulator -avd phoneEmulator" (phoneEmulator is the name of my emulator) it just displays:

Phil-Knights-MacBook-Pro:tools philiplknight$ ./emulator -avd phoneEmulator
2012-07-30 22:44:33.377 emulator-arm[2859:80b] Warning once: This application, or a
library it uses, is using NSQuickDrawView, which has been deprecated. 
Apps should cease use of QuickDraw and move to Quartz.

It's as if that command is never returning.

If I can't input the 2nd command ./adb install myApp.apk in that window, where do I call it?


  • Open Terminal
  • go to android-sdk-macplatform-tools
  • type ./adb install myApp.apk

  • First of all, you SHOULD NOT copy APKs to the tools or any other SDK directory. Do not cd to the SDK directories, just add them to the PATH environment var or use their absolute path in command lines. Then, if you want to run the emulator and then execute command from the same terminal, send the process to background (&):

    $ export PATH=$PATH:/path/to/sdk/tools:path/to/sdk/platform-tools
    $ emulator -avd myEmulator &
    $ adb install /path/to/my.apk
    

    You can work around by:

  • Upload yourapp.apk to internet. Ie: yourhost.com/yourapp.apk
  • Run emulator
  • Open internet browser on your emulator, visit link yourhost.com/yourapp.apk
  • Download and install
  • 链接地址: http://www.djcxy.com/p/90676.html

    上一篇: 启用Proguard后,“应用程序停止工作”

    下一篇: 在Mac OS上安装Android模拟器上的apk