0

I'm trying to make a github actions workflow to run instrumented tests on Android.

My file has steps similar to:

  • actions/checkout@v3
  • actions/setup-java@v3
  • gradle/gradle-build-action@v2
  • actions/cache@v3
  • if: steps.avd-cache.outputs.cache-hit != 'true' -> reactivecircus/android-emulator-runner@v2 (generate AVD snapshot)
  • ./gradlew connectedCheck

I've found that whenever I'm restoring a AVD cache which was found (having the same key), then I get an error when trying to build and run the instrumented test.

Exception thrown during onBeforeAll invocation of plugin com.google.testing.platform.plugin.android.AndroidDevicePlugin.
Failed to install APK(s):
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package "" signatures do not match previously installed version; ignoring!

This step passes when the AVD cache is not set and it's generating a new one. But re-using an AVD cache fails this step (./gradlew connectedCheck)

I'm not sure what to do here. Does anyone have any suggestions?

SmallGrammer
  • 893
  • 9
  • 19

0 Answers0