Android Wear 应用程序在 Moto 360 中崩溃,但在其他 watch 应用程序中运行正常

标签 android crash wear-os moto-360 wearables

我正在研究磨损应用。应用程序在其他 watch 中运行良好,但在 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 

最佳答案

此问题已在 this google forum 中打开该设备也是 moto 360。以下是工程师的回复:

There are many reasons why your Android Wear watch might show the message “Android Wear has stopped”.

  1. Make sure you are on the latest Android Wear app update.
  2. Make sure you are on the latest Android Wear watch update
  3. Try restarting your watch
  4. If none of this works, then try unpairing and pairing again.

If none of this is not working, you might try other solutions users in this thread used succesfully.

  1. Go to Settings > Apps > Android Wear - Clear Cache and Clear Data. See if this helps.
  2. Update Google app on your Android phone or iPhone
  3. Check 3rd party apps and watch faces recently installed. Try uninstalling from phone and then reboot both watch and phone.
  4. From Settings, Device, Apps, use the Uninstall updates button to back out the latest changes to Google Play Services, Then Clear cache and Clear data. There could be a problem with the latest update of Google play Services.
  5. If you have problem with some specific manufacturer or you suspect it might be a Hardware issue, please contact them
  6. Check steps on how to fix an app that is not working.

关于Android Wear 应用程序在 Moto 360 中崩溃,但在其他 watch 应用程序中运行正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44957990/

相关文章:

android - Appsflyer崩溃:致命异常:MultipleInstallBroadcastReceiver.java第43行的java.lang.NoSuchMethodError

java - 无法通过蓝牙进行调试

java - 安卓磨损 : Layout is not displaying properly in Emulator

android - 在 Android 上使用 CouchDB 有什么要求?

android - 应用程序未运行时接收 GCM Android 通知

Android 崩溃执行 C++ 代码无法使用 adb shell 复制

swift - Nil optional 在 Release 中不会崩溃

android - 为什么在使用 ROTATION_VECTOR 传感器之前克隆 Android 传感器值?

android - 在 Eclipse 中为 ndk 程序设置构建路径

Android Wear 设备作为 iBeacon