我正在研究磨损应用程序。应用程序在其他手表上运行良好,但在 Moto 360 中,当我们启动应用程序时它会崩溃。Android Wear 1.5.0,操作系统:6.0.1,Google Play 服务 11.0.55。这是日志。
--------- beginning of crash
07-06 12:48:54.471 5752-5752/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.android.wearable.app, PID: 5752
java.lang.RuntimeException: Unable to destroy activity {com.google.android.wearable.app/com.google.android.clockwork.home.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getHeight()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3831)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3849)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4053)
at android.app.ActivityThread.-wrap15(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1350)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getHeight()' on a null object reference
at com.google.android.clockwork.home.cuecard.VoicePlateFragment.onCueCardClosed(VoicePlateFragment.java:1734)
at com.google.android.clockwork.home.cuecard.VoiceUiController.close(VoiceUiController.java:440)
at com.google.android.clockwork.home.HomeActivity.removeCueCard(HomeActivity.java:1720)
at com.google.android.clockwork.home.HomeActivity.destroyCueCard(HomeActivity.java:876)
at com.google.android.clockwork.home.HomeActivity.onDestroy(HomeActivity.java:908)
at android.app.Activity.performDestroy(Activity.java:6422)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1142)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3818)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3849)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4053)
at android.app.ActivityThread.-wrap15(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1350)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5422)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-06 12:48:54.480 467-933/? W/ActivityManager: Force finishing activity com.google.android.wearable.app/com.google.android.clockwork.home.HomeActivity
07-06 12:48:54.745 467-508/? V/WindowManager: Layouts looping: On entry to LockedInner, mPendingLayoutChanges = 0x1
07-06 12:48:54.745 467-508/? V/WindowManager: Layouts looping: after finishPostLayoutPolicyLw, mPendingLayoutChanges = 0x0
07-06 12:48:54.746 467-508/? V/WindowManager: Layouts looping: mLayoutNeeded, mPendingLayoutChanges = 0x1
07-06 12:48:54.746 467-508/? V/WindowManager: Layouts looping: On entry to LockedInner, mPendingLayoutChanges = 0x1
07-06 12:48:54.747 467-508/? V/WindowManager: Layouts looping: after finishPostLayoutPolicyLw, mPendingLayoutChanges = 0x0
07-06 12:48:54.753 467-508/? V/WindowManager: Layouts looping: mLayoutNeeded, mPendingLayoutChanges = 0x1
07-06 12:48:54.754 467-508/? E/WindowManager: Performed 6 layouts in a row. Skipping
07-06 12:48:54.760 467-508/? I/ActivityManager: Displayed com.us.lexusenformremote/.Splash: +602ms
07-06 12:48:54.975 5359-5359/? I/CmaSystemUpdateService: ActiveReceiver: Intent { act=android.os.UpdateLock.UPDATE_LOCK_CHANGED flg=0x4000010 cmp=com.google.android.gms/.update.SystemUpdateServiceActiveReceiver (has extras) }
07-06 12:48:54.975 5359-5359/? I/CmaSystemUpdateService: receiver: Intent { act=android.os.UpdateLock.UPDATE_LOCK_CHANGED flg=0x4000010 cmp=com.google.android.gms/.update.SystemUpdateServiceActiveReceiver (has extras) }
07-06 12:48:55.004 213-5984/? D/hardware_info: hw_info_append_hw_type : device_name = voice-rec-dmic-ef-fluence
07-06 12:48:55.008 213-343/? D/audio_hw_primary: adev_close_input_stream: 0xb410f1e0