有没有人设法通过 Google VR 的 gvr-permissions-support 库获得许可?
Google VR 插件附带的演示,展示了如何使用 gvr-permissions-support 库来提供授予运行时权限的能力。虽然我能够运行演示,但我没有幸运地获得许可。
具体来说,当我在演示场景中单击“请求权限”按钮时,出现以下异常:
04-22 15:02:53.476 3034-3034/? E/ActivityThread: Activity com.google.gvr.permissionsupport.TransitionVRActivity has leaked ServiceConnection com.google.vr.ndk.base.DaydreamApi$1@3ed206d that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.google.gvr.permissionsupport.TransitionVRActivity has leaked ServiceConnection com.google.vr.ndk.base.DaydreamApi$1@3ed206d that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1336)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1231)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1450)
at android.app.ContextImpl.bindService(ContextImpl.java:1422)
at android.content.ContextWrapper.bindService(ContextWrapper.java:636)
at com.google.vr.ndk.base.DaydreamApi.init(DaydreamApi.java:838)
at com.google.vr.ndk.base.DaydreamApi.create(DaydreamApi.java:141)
at com.google.gvr.permissionsupport.TransitionVRActivity.onCreate(TransitionVRActivity.java:74)
at android.app.Activity.performCreate(Activity.java:6682)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
请注意,我使用 Unity 5.6 (2017.1.0b1) 和 Google VR SDK for Unity 版本 v1.40(2017 年 4 月)。我的 Unity 解决方案的最低 API 级别设置为 Android 7.0(API 级别 24)。