Describe the bug
Running detox build -c android.emu.stag.release fails with the error above. This is only the case when i'm trying to run a release build, detox build -c android.emu.stag.debug runs fine.
The exact error i'm seeing is:
> Task :app:transformClassesAndResourcesWithR8ForStagReleaseAndroidTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithR8ForStagReleaseAndroidTest'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete
I'm using Proguard in my app (i've followed the Proguard setup for Detox) and the app usually runs
app:transformClassesAndResourcesWithProguardForStagRelease when building and not R8.
To Reproduce
Follow the setup guide for android step by step, build the app with detox build -c android.emu.stag.release. The content of .detoxrc.json is the following:
{
"testRunner": "jest",
"runnerConfig": "e2e/config.json",
"configurations": {
"android.emu.stag.debug": {
"binaryPath": "android/app/build/outputs/apk/stag/debug/app-stag-debug.apk",
"build": "cd android && ./gradlew app:assembleStagDebug app:assembleStagDebugAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"device": {
"avdName": "Pixel_API_29_AOSP"
}
},
"android.emu.stag.release": {
"binaryPath": "android/app/build/outputs/apk/stag/release/app-stag-release.apk",
"build": "cd android && ./gradlew app:assembleStagRelease app:assembleStagReleaseAndroidTest -DtestBuildType=release && cd ..",
"type": "android.emulator",
"device": {
"avdName": "Pixel_API_29_AOSP"
}
}
}
}
Expected behavior
I would expect the build to pass the same way it does for the debug build.
Logs:
This is a small part of what i'm seeing before it fails (the list goes on forever, i can't even see the full trace in my terminal):
R8: 'void ensureIsInitialized()' already has a mapping
R8: 'void initialize()' already has a mapping
R8: 'java.util.Map getPropSetterInfos()' already has a mapping
R8: 'void <clinit>()' already has a mapping
R8: 'void <clinit>()' already has a mapping
R8: 'void <clinit>()' already has a mapping
R8: 'void <init>(com.facebook.react.uimanager.ThemedReactContext,android.util.AttributeSet)' already has a mapping
R8: 'android.net.Uri getURI(java.lang.String)' already has a mapping
R8: 'void drawPdf()' already has a mapping
R8: 'void setEnablePaging(boolean)' already has a mapping
R8: 'void setFitPolicy(int)' already has a mapping
Environment
- Detox: 17.10.6
- React Native: ~0.63.2
- Node: v12.14.1
- Device: Pixel 1 emulator
- OS: android
- Test-runner:
jest-circus
Describe the bug
Running
detox build -c android.emu.stag.releasefails with the error above. This is only the case when i'm trying to run a release build,detox build -c android.emu.stag.debugruns fine.The exact error i'm seeing is:
I'm using Proguard in my app (i've followed the Proguard setup for Detox) and the app usually runs
app:transformClassesAndResourcesWithProguardForStagReleasewhen building and notR8.To Reproduce
Follow the setup guide for android step by step, build the app with
detox build -c android.emu.stag.release. The content of.detoxrc.jsonis the following:Expected behavior
I would expect the build to pass the same way it does for the debug build.
Logs:
This is a small part of what i'm seeing before it fails (the list goes on forever, i can't even see the full trace in my terminal):
Environment
jest-circus