Android无法在模拟器上安装该应用程序

时间:2012-07-10 19:25:55

标签: android sockets android-install-apk

我有一个Android应用程序,我试图通过从URL下载来测试安装。该应用程序由我开发,我可以使用emulator将应用加载到eclipse并正确运行。

我将apk上传到网络服务器,并将模拟器android浏览器指向位置http://localhost:9080/myapp.apk。模拟器正确下载应用程序。当我尝试单击要安装的下载文件时,会抛出错误Unfortunately the process android.process.media has stopped。我不确定如何进一步解决此问题

Emulator Configuration: Android avd running on API 14, ICS 4.0.0 with 1GB sdcard.iso

欣赏任何见解。

Logcat显示以下内容:

07-10 19:17:19.195: I/qtaguid(380): Untagging socket 65 failed errno=-2
07-10 19:17:19.195: W/NetworkManagementSocketTagger(380): untagSocket(65) failed with errno -2
07-10 19:17:19.624: D/dalvikvm(80): GC_CONCURRENT freed 398K, 10% free 12133K/13383K, paused 10ms+10ms
07-10 19:17:20.174: D/dalvikvm(147): GC_CONCURRENT freed 699K, 31% free 11440K/16455K, paused 4ms+8ms
07-10 19:17:20.734: D/dalvikvm(147): GC_CONCURRENT freed 535K, 32% free 11325K/16455K, paused 3ms+7ms
07-10 19:17:21.025: D/dalvikvm(80): GC_EXPLICIT freed 105K, 10% free 12084K/13383K, paused 5ms+11ms
07-10 19:17:21.484: D/dalvikvm(380): GC_CONCURRENT freed 373K, 5% free 10112K/10631K, paused 4ms+5ms
07-10 19:17:24.464: W/KeyguardViewMediator(80): verifyUnlock called when not externally disabled
07-10 19:17:24.594: W/dalvikvm(380): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Landroid/drm/DrmManagerClient;
07-10 19:17:24.604: D/AndroidRuntime(380): Shutting down VM
07-10 19:17:24.614: W/dalvikvm(380): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
07-10 19:17:24.654: E/AndroidRuntime(380): FATAL EXCEPTION: main
07-10 19:17:24.654: E/AndroidRuntime(380): java.lang.ExceptionInInitializerError
07-10 19:17:24.654: E/AndroidRuntime(380):  at com.android.providers.downloads.DownloadDrmHelper.getOriginalMimeType(DownloadDrmHelper.java:97)
07-10 19:17:24.654: E/AndroidRuntime(380):  at com.android.providers.downloads.DownloadReceiver.openDownload(DownloadReceiver.java:153)
07-10 19:17:24.654: E/AndroidRuntime(380):  at com.android.providers.downloads.DownloadReceiver.handleNotificationBroadcast(DownloadReceiver.java:104)
07-10 19:17:24.654: E/AndroidRuntime(380):  at com.android.providers.downloads.DownloadReceiver.onReceive(DownloadReceiver.java:74)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.app.ActivityThread.handleReceiver(ActivityThread.java:2118)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.app.ActivityThread.access$1500(ActivityThread.java:122)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.os.Looper.loop(Looper.java:137)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.app.ActivityThread.main(ActivityThread.java:4340)
07-10 19:17:24.654: E/AndroidRuntime(380):  at java.lang.reflect.Method.invokeNative(Native Method)
07-10 19:17:24.654: E/AndroidRuntime(380):  at java.lang.reflect.Method.invoke(Method.java:511)
07-10 19:17:24.654: E/AndroidRuntime(380):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 19:17:24.654: E/AndroidRuntime(380):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 19:17:24.654: E/AndroidRuntime(380):  at dalvik.system.NativeStart.main(Native Method)
07-10 19:17:24.654: E/AndroidRuntime(380): Caused by: java.lang.UnsatisfiedLinkError: Library drmframework_jni not found; tried [/vendor/lib/libdrmframework_jni.so, /system/lib/libdrmframework_jni.so]
07-10 19:17:24.654: E/AndroidRuntime(380):  at java.lang.Runtime.loadLibrary(Runtime.java:393)
07-10 19:17:24.654: E/AndroidRuntime(380):  at java.lang.System.loadLibrary(System.java:535)
07-10 19:17:24.654: E/AndroidRuntime(380):  at android.drm.DrmManagerClient.<clinit>(DrmManagerClient.java:56)
07-10 19:17:24.654: E/AndroidRuntime(380):  ... 15 more
07-10 19:17:24.804: W/InputManagerService(80): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41647c30
07-10 19:17:25.044: I/WindowManager(80): createSurface Window{415ef168  paused=false}: DRAW NOW PENDING

2 个答案:

答案 0 :(得分:4)

显然是上面@SevaAlekseyev指出的Android中的一个错误 code.google.com/p/android/issues/detail?id=21173

我可以通过点击下载中的应用

来安装

答案 1 :(得分:0)

已在4.1(API 16)中解决。由于链接错误不满意,我得到了同样的错误,libdrmframework_jni.so。在设备上运行良好。