-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detox Build Failed #4371
Comments
Thanks @victor-chan-groundswell ! This made the build succeed But unfortunately, while testing, the app kept crashing. detox test --configuration android.emu.debug
May I ask if it happened with you afterwards? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
We're getting this same building android, ios builds fine. Detox 20.19.3
|
@moatasemyakhni Replace the standard Detox dependency in your - androidTestImplementation('com.wix:detox:+')
+ androidTestImplementation('com.wix:detox-legacy:+') This fixed build issues for us and test run as normal. |
Hello @raldred, have you tried adding in
and add at the top level of this file
|
Thanks for the link, I was trying java 11 as a last solution. By default I have java 17. The solution provided by @victor-chan-groundswell kept me using java 17. |
Hi @moatasemyakhni , do you fix the error ?
|
Hello @nicoleRss, turns out the binaryPath I chose runs app-arm64-v8a-debug.apk while my emulator runs app-armeabi-v7a-debug.apk. This is why it was failing. To know what your emulator cpu is, follow the below steps in the command line:
my .detoxrc.js file have this binaryPath I was talking about.
note: if you are using windows instead of mac. replace the ";" with "&" |
This one is solved my issue, thanks. |
This work for me, thanks |
What happened?
while running
detox build --configuration android.emu.debug
The build failed while executing with two main errors
Error One
Error Two
What was the expected behaviour?
To have a successful build like ios
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
in ./android/build.gradle
allprojects { repositories { google() maven { url("$rootDir/../node_modules/detox/Detox-android") } } }
in ./android/app/build.gradle
androidTestImplementation('com.wix:detox:+') {
transitive = true
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
// exclude module: "protobuf-lite"
}
`
in ./android/app/src/androidTest/org/my/package/DetoxText.java
`package org.my.package; // (1)
import com.wix.detox.Detox;
import com.wix.detox.config.DetoxConfig;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class DetoxTest {
@rule // (2)
public ActivityTestRule mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
}`
In what environment did this happen?
Detox version: ^20.18.1
React Native version: 0.71.13
Has Fabric (React Native's new rendering system) enabled: no
Node version: .node-version file is 18 and npm -v is 20.10.0
Device model: Android_10_Pixel_5_API_29
Android version: 10
Test-runner (select one): jest
Detox logs
Detox logs
Device logs
Device logs
More data, please!
approaches I did in ./android/app/build.gradle file
approach1:
I am using java17 so I added these, but it did not work. So I rolled back.
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
kotlin {
jvmToolchain(11)
}
approach2:
I tried changing wix version in dependencies
androidTestImplementation('com.wix:detox:0.1.1') // and other versions like 0.0.0, 0.01, ...
and added this outside the dependencies
configurations.all {
resolutionStrategy {
force 'androidx.test:core:1.5.0'
}
}
The text was updated successfully, but these errors were encountered: