使用 Firebase 获取 "The test APK does not contain the test runner class specified by the user or the manifest file."

Getting "The test APK does not contain the test runner class specified by the user or the manifest file." with Firebase

我在尝试通过命令行 运行 UI 在 firebase 上进行测试时遇到以下错误:

Test [matrix-1dy3j2omlw7n9] has been created in the Google Cloud.
Firebase Test Lab will execute your instrumentation test on 1 device(s).
Creating individual test executions...failed.                                  
ERROR: (gcloud.firebase.test.android.run) 
Matrix [matrix-1dy3j2omlw7n9] failed during validation: The test APK does not contain the test runner class specified by the user or the manifest file. The test runner class name may be incorrect, or the class may be mislocated in the app APK..

当我尝试使用 2 个 apk 在本地通过命令行 运行 测试时,我能够 运行 测试就好了。这就是我在命令行中使用的从 firebase 获取错误消息的方法:

gcloud firebase test android run \
>   --type instrumentation \
>   --app app-fred-stage-debug-androidTest.apk \
>   --test app-fred-stage-debug.apk \
>   --device model=Nexus6,version=21,locale=en,orientation=portrait

我需要添加什么来解决这个问题?

TIA

看起来应用 apk 和测试 apk 在参数中交换了。应该是

gcloud firebase test android run \
    --type instrumentation \
    --app app-fred-stage-debug.apk \
    --test app-fred-stage-debug-androidTest.apk \
    --device model=Nexus6,version=21,locale=en,orientation=portrait