排毒测试:未找到 React Native android 应用程序二进制文件

问题描述

我正在尝试使用 detox 来测试我的 React Native 应用程序。我运行 detox build --configuration android.emu.debug 成功,但是当我运行 detox test --configuration android.emu.debug 时,出现错误

错误:在“xxx/xxx/android/app/build/outputs/apk/androidTest/debug/app-debug.apk”中找不到应用程序二进制文件,您构建了吗?

我更改了路径,但它不起作用。我该如何解决这个问题?

  "testRunner": "jest","runnerConfig": "e2e/config.json","configurations": {
    "ios": {
      "type": "ios.simulator","binaryPath": "./ios/build/Build/Products/Debug-iphonesimulator/xxx.app","build": "xcodebuild -workspace iOS/xxx.xcworkspace -scheme xxx -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build","device": {
        "type": "iPhone 11"
      }
    },"android.emu.debug": {
      "device": {
        "avdName": "Pixel_API_28_AOSP"
      },"type": "android.emulator","binaryPath": "android/app/build/outputs/apk/androidTest/debug/app-debug.apk","build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd .."
    },"android.emu.release": {
      "device": "emulator","app": "android.release"
    }
  }
}

适用于 iOS

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)