You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to setup Detox / cucumber with my already built react-native app. I followed the steps in Detox for Android to setup.
My build passes when I run cd android && ./gradlew clean && ./gradlew assembleDebug but if I add assembleAndroidTest -DtestBuildType=debug && cd .. to my build, detox build fails. I found this out when I tried to run gradle commands separately.
I have tried to run ./gradlew assembleAndroidTest on Android studio as well but it fails.
The error:
> Task :app:compileDebugAndroidTestJavaWithJavac FAILED
/Users/asb/Downloads/DroidApp/android/app/src/androidTest/java/com/DroidApp/DetoxTest.java:20: error: cannot find symbol
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
^
symbol: class MainActivity
location: class DetoxTest
/Users/asb/Downloads/DroidApp/android/app/src/androidTest/java/com/DroidApp/DetoxTest.java:20: error: cannot find symbol
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
^
symbol: class MainActivity
location: class DetoxTest
/Users/asb/Downloads/DroidApp/android/app/src/androidTest/java/com/DroidApp/DetoxTest.java:32: error: cannot find symbol
detoxConfig.rnContextLoadTimeoutSec = (com.nanosonics.audit_proBuildConfig.DEBUG ? 180 : 60);
^
symbol: class audit_proBuildConfig
location: package com.nanosonics
Note: /Users/asb/Downloads/DroidApp/android/app/src/androidTest/java/com/DroidApp/DetoxTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
299 actionable tasks: 27 executed, 272 up-to-date
16:37:20.196 detox[73423] WARN: [build.js]
Important: 'detox build' is a convenience shortcut for calling your own build command, as provided in the config file.
Failures in this build command are not the responsibility of Detox. You are responsible for maintaining this command.
16:37:20.206 detox[73423] ERROR: [cli.js] Command failed: cd android && ./gradlew clean && ./gradlew assembleDebug && ./gradlew assembleAndroidTest -DtestBuildType=debug && cd ..
error Command failed with exit code 1.
I'm using Mac OS 12.3, have the latest android studio, used the latest Kotlin version.
Description
I am trying to setup Detox / cucumber with my already built react-native app. I followed the steps in Detox for Android to setup.
My build passes when I run
cd android && ./gradlew clean && ./gradlew assembleDebug
but if I addassembleAndroidTest -DtestBuildType=debug && cd ..
to my build, detox build fails. I found this out when I tried to run gradle commands separately.My .detoxrc.js config file:
I have tried to run .
/gradlew assembleAndroidTest
on Android studio as well but it fails.The error:
I'm using Mac OS 12.3, have the latest android studio, used the latest Kotlin version.
In my package.json, I have the following scripts:
"detox:e2e:ios-debug": "DETOX_CONFIGURATION=ios.sim.debug npx cucumber-js", "detox:build:android-debug": "detox build --configuration android.att.debug", "detox:e2e:android-debug": "DETOX_CONFIGURATION=android.att.debug npx cucumber-js"
Your environment
Detox version: 19.6.9
React Native version: 0.64.2 / react-native-cli: 2.0.1
Node version: v18.0.0
Device model: MacBook Pro
OS: 12.3
Test-runner (select one): cucumber
The text was updated successfully, but these errors were encountered: