The problem is that Bitrise does not find the apk although the apk is present by checking with remote access. The reason is that the apk path that Bitrise is using is wrong and it is also not the path that is specified inside the detox configuration.
This is where the apk is located using remote access: /Users/vagrant/git/android/app/build/outputs/apk/androidTest/prd/release/app-prd-release-androidTest.apk
This is the binaryPath inside the detox configuration:
android/app/build/outputs/apk/androidTest/prd/release/app-prd-release-androidTest.apk
This is the path where Bitrise is looking for the apk:
/Users/vagrant/git/android/app/build/outputs/apk/androidTest/androidTest/prdRelease/androidTest/app-prd-release-androidTest-androidTest.apk'
I am using four steps in the workflow:
- AVD Manager:
- Device Profile: pixel
- Android API Level: 26
- OS Tag: google_apis
-
Wait for Android Emulator
-
Run Yarn Command:
- Working Directory: $BITRISE_SOURCE_DIR
- Yarn command: detox build --configuration android.release
- Run Yarn Command:
- Working Directory: $BITRISE_SOURCE_DIR
- Yarn command: detox test --configuration android.release --cleanup
This is the detox configuration:
"android.release": {
"type": "android.apk",
"build": "cd android && ./gradlew --no-daemon assemblePrd assembleAndroidTest -DtestBuildType=release && cd ..",
"binaryPath": "android/app/build/outputs/apk/androidTest/prd/release/app-prd-release-androidTest.apk"
}
How can I change the path so that Bitrise can find the apk?