如何在 Eclipse ADT 中安装我的应用程序所需的外部 APK?
我需要依赖外部应用程序(在我的例子中是条形码扫描仪)。当我尝试从模拟器本身下载它时,Eclipse 模拟器崩溃了。
- 有没有办法用模拟器下载?
- 或者有没有办法直接安装 APK 并使其可用于我的应用程序?
I need to rely on external app (Barcode scanner in my case). The eclipse emulator crashes when I try to download it from within the emulator itself.
- Is there a way to download it using the emulator?
- Or Is there a way to directly install the APK and make it available for my application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从 eclipse 运行模拟器。
使用以下命令检查是否检测到设备:
>adb devices
我运行了
adb install foo.apk
这在模拟器中安装了 APK。
如果命令提示符显示没有 AVD,您将需要创建一个
>android create avd -n; -t 2
在工具中安装apk被认为是最佳实践
I ran the emulator from eclipse.
Check to see if the device is detected using :
>adb devices
I ran the
adb install foo.apk
This installed the APK in the emulator.
If the Command prompt says no AVD, you will need to create one
>android create avd -n <avd-name> -t 2
Installing the apk in the tools is considered the best practice
你可以把它下载到你的电脑上,复制到SD卡上,然后在你的手机里安装一个文件管理器,我用的是ASTRO,浏览到ASTRO中的apk并打开它,这会要求你安装它。在安装之前,您需要将手机设置为允许安装未知来源(即非市场应用程序)(设置 -> 应用程序)。
You could download it to your computer, copy it to the sdcard, then install a file manager in your phone, I use ASTRO, browse to the apk in ASTRO and open it, this will ask you to install it. Before you can install it, you need to set your phone to allow Unknown Sources (i.e. non-Market apps) to be installed (Settings -> Applications).