0

This is definitely related to: This

However, even if I add: android:testOnly="true" as suggested in This to my android manifest, it still occurs.

My process for generating the binaries is to first clean, then run the test locally from Android Studio (Version 3.5). It installs onto my USB attached device and runs the tests just fine locally. However, using the binaries generated from running the tests, and using them on the AWS device farm begets the error mentioned.

What makes this slightly more confusing for me is that this seems to only occur on Google Pixel devices, not on older android hardware.

Please advise...

Michael Lupo
  • 326
  • 3
  • 17
  • The advice suggested in the mentioned thread was to set the flag `android:testOnly="false"` not "true". – KraffMann Apr 02 '20 at 06:32

1 Answers1

1

The answer to this is DO NOT USE ANDROID STUDIO to compile the binaries for AWS. You should use gradle at the command line. You may still find it necessary to include the android:testOnly="true" in the android manifest as suggested in This

<application
        android:name="example.com.foo.MapMainApp"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:testOnly="false"
        android:theme="@style/AppTheme">

for example (terminal)

~/gradle-5.5/bin/gradle assembleDebug assembleAndroidTest

What I do next is grab the two binaries from /build/outputs/apk/debug/.apk and /build/outputs/apk/androidTest/debug/.apk and upload them to the AWS device farm during the new test run creation workflow.

Happy testing!

Michael Lupo
  • 326
  • 3
  • 17