如何安装在Android模拟器的APK文件? [英] How do you install an APK file in the Android emulator?
问题描述
我终于设法混淆我的Android应用程序,现在我想通过安装 APK 以测试它文件,并在模拟器上运行它。
我怎样才能在Android模拟器安装APK文件?
视窗:
- 执行模拟器(SDK Manager.exe- - >工具 - >管理AVDS ...->然后新的起点)
- 启动控制台(Windows XP中),运行 - >键入 CMD ,并移动到平台工具 SDK 目录下的文件夹中。
- 粘贴的 APK 的在Android的SDK \工具或平台工具文件夹中的文件。
-
然后键入以下命令。
亚行安装[apk文件路径]
例如:
亚行安装C:\ Users \用户名\ MyProject的\建立\ Jorgesys.apk
的Linux:
- 副本
Android的SDK的Linux
文件夹中的apk文件到平台工具
。 - 开启终端和导航到平台的工具文件夹中的 Android的SDK
- 然后执行此命令 -
./ ADB安装FileName.apk
- 如果操作成功(结果会显示在屏幕上),那么你会发现在你的模拟器的启动文件。
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:
- Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
- Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
- Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
Then type the following command.
adb install [.apk path]
Example:
adb install C:\Users\Name\MyProject\build\Jorgesys.apk
Linux:
- Copy the apk file to
platform-tools
inandroid-sdk linux
folder. - Open Terminal and navigate to platform-tools folder in android-sdk.
- Then Execute this command -
./adb install FileName.apk
- 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屋!