0

好吧,我创建的动态壁纸有问题,但我发现这个问题只发生在使用股票启动器运行 2.3.3 的股票关系上。这在我测试过的其他设备上效果很好:Moto Droid 2.3.3、Nexus S 2.3.4、HTC MyTouch 4G 2.3.3,而且我只收到过关于 nexus 崩溃的报告。

动态壁纸在壁纸上显示您的相机预览。单击设置壁纸后,您将打印下面的堆栈跟踪。您可以看到它设置了相机并开始预览,但随后立即调用 onDestroy 然后由于之后的错误而强制关闭。一直黑屏。(这是一旦他们选择了设置壁纸,我没有在小壁纸预览屏幕上做任何事情)。

任何线索发生了什么?没有一个堆栈跟踪浸入我的代码。所以我不确定在哪里看。而且我尝试过调试它,但它永远不会触发我的一个断点,即使是它似乎正在命中并打印我的日志的代码中的断点?

05-31 17:14:53.945: ERROR/CameraWallpaper(1426): Camera is null, opening camera
05-31 17:14:53.955: ERROR/CameraWallpaper(1426): Target Height: 800
05-31 17:14:53.955: DEBUG/CameraWallpaper(1426): Setting effect
05-31 17:14:53.955: DEBUG/CameraWallpaper(1426): Setting mode
05-31 17:14:53.965: ERROR/CameraWallpaper(1426): Parameters set: 640x480
05-31 17:14:53.965: ERROR/CameraWallpaper(1426): Starting Preview
05-31 17:14:54.095: ERROR/CameraWallpaper(1426): Preview Started
05-31 17:14:54.105: ERROR/CameraWallpaper(1426): onDestroy
05-31 17:14:54.125: WARN/WallpaperService(1426): Ignoring updateSurface: destroyed
05-31 17:14:54.125: WARN/InputQueue-JNI(1426): Input channel is not initialized.
05-31 17:14:54.125: WARN/WindowManager(99): Failed looking up window
05-31 17:14:54.125: WARN/WindowManager(99): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@40741808 does not exist
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8174)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService.addWindow(WindowManagerService.java:1811)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService$Session.add(WindowManagerService.java:5658)
05-31 17:14:54.125: WARN/WindowManager(99):     at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:68)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService$Session.onTransact(WindowManagerService.java:5630)
05-31 17:14:54.125: WARN/WindowManager(99):     at android.os.Binder.execTransact(Binder.java:320)
05-31 17:14:54.125: WARN/WindowManager(99):     at dalvik.system.NativeStart.run(Native Method)
05-31 17:14:54.125: WARN/WindowManager(99): Attempted to add window with token that is not a window: android.os.BinderProxy@40741808.  Aborting.
05-31 17:14:54.135: DEBUG/AndroidRuntime(1426): Shutting down VM
05-31 17:14:54.135: WARN/dalvikvm(1426): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426): FATAL EXCEPTION: main
05-31 17:14:54.135: ERROR/AndroidRuntime(1426): java.lang.RuntimeException: Failed to register input channel.  Check logs for details.
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:904)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.os.Looper.loop(Looper.java:123)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.app.ActivityThread.main(ActivityThread.java:3683)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at java.lang.reflect.Method.invokeNative(Native Method)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at java.lang.reflect.Method.invoke(Method.java:507)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at dalvik.system.NativeStart.main(Native Method)
05-31 17:14:58.875: INFO/Process(1426): Sending signal. PID: 1426 SIG: 9
05-31 17:14:58.905: INFO/ActivityManager(99): Process com.brayden.camera (pid 1426) has died.
4

1 回答 1

0

我之前制作了一个相机动态壁纸,它适用于 API 8 到 11。注意到 N1 不附带库存 2.3.3,你使用的是什么 ROM?我遇到了自定义 ROM 的问题,其中相机硬件 XML 配置不当并且神秘地失败,并且在硬件被迫重新创建它时得到修复。此外:

您没有捕捉到抛出的 RuntimeException,也没有实现 Camera.ErrorCallback。你在使用 API 1 Camera.open() 吗?如果是这样,当检测到 Gingerbread+ 时,您应该尝试调用 API 9+ 提供的 Camera.open(int)。

于 2011-06-29T01:25:50.377 回答