Android:在 Eclipse 中将用户库放到 AVD 上

标签 android avd

我正在尝试将一个库(例如 uses-library)放到 AVD 上,如果我用 ADB 推送它,操作系统不知道它存在,并且重新启动模拟器会从内存中清除推送的文件。我发现可以在启动模拟器时加载一个库:

If your application declares a uses-library element in its manifest file, the application can only run on a system image in which that external library is present. If you want to run your application on an emulator, create an AVD that includes the required library. Usually, you must create such an AVD using an Add-on component for the AVD's platform (for example, the Google APIs Add-on contains the Google Maps library).

http://developer.android.com/guide/developing/devices/index.html

如何从文件而不是附加组件中包含我的库?

最佳答案

如果库在 APK 中,那么您需要将其复制到设备,然后使用模拟器上的包管理器安装它。

如果库在 Jar 中,则需要将其添加到项目构建路径中。执行此操作后,该库将包含在已编译的 APK 中,并在您安装 APK 时将其放置在模拟器上。

关于Android:在 Eclipse 中将用户库放到 AVD 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6022674/

相关文章:

android-fragments - Google 在 AVD 上使用 4.3 SDK 18 映射 v2 灰屏

android - SD 卡(在 AVD 中创建)在 Android Studio 模拟器中显示为 "removed"

android - 无法在模拟器中启动 AVD。请确保英特尔 HAXM 已正确安装并可用

android - 在我的实时设备上运行代码时,Firebase 作业调度程序不会触发我的 JobService 类,为什么?

Android NDK 找不到原生函数

android - OnLongClickListener 没有正常工作

android - 在 Windows XP 的命令提示符下创建 AVD 问题

android - 添加 firebase 依赖项会导致 gradle 同步失败

android - Linphone Android : TLS Handshake Error with Self Signed Certificate

android - 如何打开apk文件