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

时间:2021-02-23 18:55:03

I have an android application and am trying to test the installation by downloading from a URL. The app is developed by me and I can load the app into emulator using eclipse and run it properly.

我有一个android应用程序,正在尝试通过从URL下载来测试安装。这个应用程序是由我开发的,我可以使用eclipse将应用程序加载到仿真器中并正常运行。

I uploaded the apk to webserver and point the emulators android browser to the location http://localhost:9080/myapp.apk. Emulator downloads the app properly. When I try to click on the downloaded file to install, it throws an error saying Unfortunately the process android.process.media has stopped. I am not sure how to proceed further to resolve this issue

我将apk上传至webserver,并将模拟器的android浏览器指向http://localhost:9080/myapp.apk。模拟器正确地下载应用程序。当我尝试单击下载的文件来安装时,它会抛出一个错误,不幸的是,进程android.process。媒体已经停止。我不知道该如何进一步解决这个问题。

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

Appreciate any insights.

欣赏任何见解。

Logcat shows the following:

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 个解决方案

#1


4  

Apparently its a bug in Android as pointed by @SevaAlekseyev above code.google.com/p/android/issues/detail?id=21173

显然,它是Android上的一个bug,正如@SevaAlekseyev所指出的,上面是code.google.com/p/android// detail?id=21173。

I was able to install by clicking on the app from downloads

我可以通过点击下载中的应用程序进行安装

#2


0  

Resolved in 4.1 (API 16). I get the same error because of an unsatisfied link error, libdrmframework_jni.so. Works well on a device.

在4.1中解析(API 16)。由于不满意的链接错误libdrmframework_jniso,我得到了相同的错误。在设备上工作得很好。

#1


4  

Apparently its a bug in Android as pointed by @SevaAlekseyev above code.google.com/p/android/issues/detail?id=21173

显然,它是Android上的一个bug,正如@SevaAlekseyev所指出的,上面是code.google.com/p/android// detail?id=21173。

I was able to install by clicking on the app from downloads

我可以通过点击下载中的应用程序进行安装

#2


0  

Resolved in 4.1 (API 16). I get the same error because of an unsatisfied link error, libdrmframework_jni.so. Works well on a device.

在4.1中解析(API 16)。由于不满意的链接错误libdrmframework_jniso,我得到了相同的错误。在设备上工作得很好。