Skip to content
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 fails on Android #1632

Closed
1 task done
clems36 opened this issue Aug 29, 2019 · 2 comments
Closed
1 task done

detox build fails on Android #1632

clems36 opened this issue Aug 29, 2019 · 2 comments

Comments

@clems36
Copy link

clems36 commented Aug 29, 2019

Hi! I can't get past detox build on a brand new Expokit project. The build fails on these tasks:

> Transform full.jar (project :unimodules-core) with DexingTransform
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): java.util.List org.unimodules.core.interfaces.Package.createExportedModules(android.content.Context)","sources":[{}],"tool":"D8"}

> Task :expo-font:mergeLibDexDebugAndroidTest FAILED
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): java.util.List org.unimodules.core.interfaces.Package.createExportedModules(android.content.Context)","sources":[{}],"tool":"D8"}

> Task :expo-linear-gradient:mergeLibDexDebugAndroidTest FAILED
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): java.util.List org.unimodules.core.interfaces.Package.createExportedModules(android.content.Context)","sources":[{}],"tool":"D8"}

> Task :expo-app-loader-provider:mergeLibDexDebugAndroidTest FAILED
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): java.util.List org.unimodules.core.interfaces.Package.createExportedModules(android.content.Context)","sources":[{}],"tool":"D8"}

> Task :expo-constants:mergeLibDexDebugAndroidTest FAILED
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): java.util.List org.unimodules.core.interfaces.Package.createExportedModules(android.content.Context)","sources":[{}],"tool":"D8"}

FAILURE: Build completed with 4 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Could not resolve all files for configuration ':expo-font:debugAndroidTestRuntimeClasspath'.
> Failed to transform file 'full.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=21} using transform DexingTransform
   > Error while dexing.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Could not resolve all files for configuration ':expo-linear-gradient:debugAndroidTestRuntimeClasspath'.
> Failed to transform file 'full.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=21} using transform DexingTransform
   > Error while dexing.

* 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.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Could not resolve all files for configuration ':expo-app-loader-provider:debugAndroidTestRuntimeClasspath'.
> Failed to transform file 'full.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=21} using transform DexingTransform
   > Error while dexing.

* 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.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Could not resolve all files for configuration ':expo-constants:debugAndroidTestRuntimeClasspath'.
> Failed to transform file 'full.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=21} using transform DexingTransform
   > Error while dexing.

Here's my config (works fine on iOS):

"detox": {
  "configurations": {
    "ios.sim.debug": {
      "binaryPath": "/Users/clementdebellefroid/Library/Developer/Xcode/DerivedData/detox-test-bdznjcaewoobdcfdwtdisdwidhjo/Build/Products/Debug-iphonesimulator/detox-test.app",
      "build": "xcodebuild -workspace ios/detox-test.xcworkspace -scheme detox-test -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
      "type": "ios.simulator",
      "name": "iPhone SE"
    },
    "android.device.debug": {
      "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
      "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
      "type": "android.attached",
      "name": "HYF0219402003939"
    }
  },
  "test-runner": "jest"
},

To Reproduce

  • I have tested this issue on the latest Detox release and it still reproduces

Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.

  1. Run expo init to create a new project
  2. Run expo eject make it an expokit project
  3. cd into your project, run yarn && cd ios && pod install
  4. Follow the steps to configure detox
  5. Add the android.device.debug config
  6. Run detox build -c android.device.debug

Here's a repo to help reproduce the issue: https://github.com/clems36/detox-test

Environment:

  • Detox: 14.0.3
  • React Native: 0.59.8
  • Node: v12.9.0
  • macOS: Mojave 10.14.6

This might not be directly related to Detox but i assume it affects anyone who creates an expokit project.

@support
Copy link

support bot commented Aug 30, 2019

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.

Feel free to post your Stack Overflow question here for more visility. We'll take a look at it.

For issues with Expo apps, it is most likely not an issue with Detox itself, but with the Expo runtime or with incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.

For more information on bots in this reporsitory, read this discussion.

@support support bot closed this as completed Aug 30, 2019
@clems36
Copy link
Author

clems36 commented Aug 30, 2019

Here's the stackoverflow question: https://stackoverflow.com/questions/57723138/detox-build-fails-on-android-error-while-dexing

@lock lock bot locked as resolved and limited conversation to collaborators Sep 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants