web-dev-qa-db-ja.com

Google Fabric:UiAutomationが接続されていません

Google Play Betaにアプリを展開した後、Crashlyticsで次の問題が表示されます(6〜7人のユーザーが影響を受けます)

Fatal Exception: Java.lang.IllegalStateException: UiAutomation not connected!
   at Android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.Java:971)
   at Android.app.UiAutomation.disconnect(UiAutomation.Java:237)
   at Android.app.Instrumentation.finish(Instrumentation.Java:222)
   at Android.support.test.runner.MonitoringInstrumentation.finish(MonitoringInstrumentation.Java:351)
   at Android.support.test.runner.AndroidJUnitRunner.finish(AndroidJUnitRunner.Java:405)
   at Android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.Java:394)
   at Android.app.Instrumentation$InstrumentationThread.run(Instrumentation.Java:1960)

Googleテストデバイスのようです。修正に関するアイデアはありますか?

47
Vitalii

このクラッシュは、アプリのUIテストに関連しているようです。 UIテストがなく、プロジェクトの作成中に自動的に追加されるデフォルト設定のみがある場合、build.gradleからdefaultConfigの行testInstrumentationRunnerを削除する必要があります。

  defaultConfig {
   ....
   testInstrumentationRunner "Android.support.test.runner.AndroidJUnitRunner"
} 

およびandroidTestCompile、testCompile依存関係

dependencies {
androidTestCompile('com.Android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.Android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
...
7
E I

心配する必要はないようです(受け入れられた回答に依存せず、テストを削除しないでください;))作成時にクラッシュが報告されているためいくつかのUI自動化テストが実行されたGoogle Playストアの事前起動レポート。このエラーが発生したデバイスを追跡すると、すべてのパスが起動前レポートにつながることがわかります。

打ち上げ前のレポートの詳細については、こちらをご覧ください こちら

15
ares

1つ確かなことは、UIに問題があることです。ほとんどの場合、これは、長時間表示され続ける進行状況ダイアログを表示するときに発生します。この場合、Googleクローラーはタイムアウトになり、例外が発生します。私のアドバイスは:無限のダイアログでUIをブロックしないようにしてください。

0