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

AndroidTest build failure due to Java 8 incompatibility #104

Closed
antpuleo2586 opened this issue Oct 9, 2019 · 2 comments
Closed

AndroidTest build failure due to Java 8 incompatibility #104

antpuleo2586 opened this issue Oct 9, 2019 · 2 comments

Comments

@antpuleo2586
Copy link

I'm having an issue when building an android test app via the Detox testing framework.
It looks like you're using Java 8 features without enabling the desugaring:

* What went wrong:
Execution failed for task ':react-native-ux-cam:mergeExtDexDebugAndroidTest'.
> Could not resolve all files for configuration ':react-native-ux-cam:debugAndroidTestRuntimeClasspath'.
   > Failed to transform file 'uxcam.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16, org.gradle.usage=java-runtime-jars}
      > Execution failed for DexingTransform: /Users/me/my-app/node_modules/react-native-ux-cam/android/libs/uxcam.jar.
         > Error while dexing.
           The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
           android {
               compileOptions {
                   sourceCompatibility 1.8
                   targetCompatibility 1.8
               }
           }
           See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.

If I patch your build.gradle file with:

android {
    compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
    }
    ...

then everything works.

Any chance this could be updated in the repo? I can open a PR if you want?

Cheers

Ant

@susanuxcam
Copy link

Hey @antpuleo2586, thanks for letting us know about the issue. I've already sent it to our developers and I will come back to you as soon as I hear back from them.

@susanuxcam
Copy link

hey again @antpuleo2586! I just wanted to let you know that this issue has been resolved with the latest release. Please, make sure to do a version update and verify if it helped. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants