【问题标题】:Android mediaplayback service binding causes SecurityException?Android mediaplayback服务绑定导致SecurityException?
【发布时间】:2012-03-09 04:25:34
【问题描述】:

在 android 4.0.3 中绑定 MediaPlaybackService 时会抛出如下异常:

03-09 09:51:08.399: 错误/AndroidRuntime(664): java.lang.RuntimeException: 无法启动活动 ComponentInfo{com.sudarmuthu.android.adjustvolume/com.sudarmuthu.android.adjustvolume.AdjustVolume}: java.lang.SecurityException:不允许绑定到服务 Intent { cmp=com.android.music/.MediaPlaybackService } 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ActivityThread.access$600(ActivityThread.java:123) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.os.Handler.dispatchMessage(Handler.java:99) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.os.Looper.loop(Looper.java:137) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ActivityThread.main(ActivityThread.java:4424) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 java.lang.reflect.Method.invokeNative(Native Method) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 java.lang.reflect.Method.invoke(Method.java:511) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 03-09 09:51:08.399: 错误/AndroidRuntime(664): at dalvik.system.NativeStart.main(Native Method) 03-09 09:51:08.399:错误/AndroidRuntime(664):原因:java.lang.SecurityException:不允许绑定到服务 Intent { cmp=com.android.music/.MediaPlaybackService } 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ContextImpl.bindService(ContextImpl.java:1135) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.content.ContextWrapper.bindService(ContextWrapper.java:370) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 com.sudarmuthu.android.adjustvolume.AdjustVolume.onStart(AdjustVolume.java:153) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1133) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.Activity.performStart(Activity.java:4475) 03-09 09:51:08.399: 错误/AndroidRuntime(664): 在 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1929)

本应用在android 2.1版本下运行流畅。

任何帮助!

【问题讨论】:

    标签: android security exception binding


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多