如何安装在Android模拟器的APK文件? [英] How do you install an APK file in the Android emulator?

查看:203
本文介绍了如何安装在Android模拟器的APK文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我终于设法混淆我的Andr​​oid应用程序,现在我想通过安装 APK 以测试它文件,并在模拟器上运行它。

我怎样才能在Android模拟器安装APK文件?

解决方案

视窗:

  1. 执行模拟器(SDK Manager.exe- - >工具 - >管理AVDS ...->然后新的起点)
  2. 启动控制台(Windows XP中),运行 - >键入 CMD ,并移动到平台工具 SDK 目录下的文件夹中。
  3. 粘贴的 APK 的在Android的SDK \工具或平台工具文件夹中的文件。
  4. 然后键入以下命令。

      

    亚行安装[apk文件路径]

    例如:

      

    亚行安装C:\ Users \用户名\ MyProject的\建立\ Jorgesys.apk

的Linux:

  1. 副本 Android的SDK的Linux 文件夹中的apk文件到平台工具
  2. 开启终端导航到平台的工具文件夹中的 Android的SDK
  3. 然后执行此命令 -

      

    ./ ADB安装FileName.apk

  4.   
  5. 如果操作成功(结果会显示在屏幕上),那么你会发现在你的模拟器的启动文件。
  6.   
  的Mac:

  PATH = $ PATH:〜/库/安卓/ SDK /平台工具
 

  

例如:PATH = $ PATH:/用户/ jorgesys /月食/ Android的SDK-mac_64 /工具

然后运行ADB。

I finally managed to obfuscate my Android application, now I want to test it by installing the APK file and running it on the emulator.

How can I install an APK file on the Android Emulator?

解决方案

Windows:

  1. Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
  2. Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
  3. Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
  4. Then type the following command.

    adb install [.apk path]

    Example:

    adb install C:\Users\Name\MyProject\build\Jorgesys.apk

Linux:

  1. Copy the apk file to platform-tools in android-sdk linux folder.
  2. Open Terminal and navigate to platform-tools folder in android-sdk.
  3. Then Execute this command -

    ./adb install FileName.apk

  4. If the operation is successful (the result is displayed on the screen), then you will find your file in the launcher of your emulator.

Mac:

PATH=$PATH:~/Library/Android/sdk/platform-tools

Example : PATH=$PATH:/users/jorgesys/eclipse/android-sdk-mac_64/tools

Then run adb.

这篇关于如何安装在Android模拟器的APK文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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