Skip to content

Instantly share code, notes, and snippets.

@IanField90
Last active September 15, 2020 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanField90/b6c0e74709dd83cdb82b274684962f39 to your computer and use it in GitHub Desktop.
Save IanField90/b6c0e74709dd83cdb82b274684962f39 to your computer and use it in GitHub Desktop.
Android 11(SDK 30, R) androidx.test.runner.AndroidJUnitRunner and Orchestrator fix.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
...>
<!--
Super important for getting tests to run on Android 30/R
Without this you will see
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{com.example.lib.test/androidx.test.runner.AndroidJUnitRunner}: java.lang.RuntimeException: Cannot connect to androidx.test.orchestrator.OrchestratorService
E/AndroidJUnitRunner: An unhandled exception was thrown by the app.
E/InstrumentationResultPrinter: Failed to mark test No Tests as finished after process crash
in the test app's Logcat
When logcat is unfiltered you will see, which lead to this diagnosis:
Unable to start service Intent { act=androidx.test.orchestrator.OrchestratorService pkg=androidx.test.orchestrator } U=0: not found
-->
<queries>
<package android:name="androidx.test.orchestrator" />
</queries>
<android ...>
</android>
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment