Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Build failed with jvm target compatibility #16

Closed
ElangoPrince opened this issue Nov 17, 2021 · 1 comment
Closed

Build failed with jvm target compatibility #16

ElangoPrince opened this issue Nov 17, 2021 · 1 comment

Comments

@ElangoPrince
Copy link

ElangoPrince commented Nov 17, 2021

Hi, I'm facing this issue while running react-native run-android.

Task :flyerhq_react-native-android-uri-path:compileDebugKotlin FAILED
'compileDebugJavaWithJavac' task (current target is 1.7) and 
'compileDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.```
@demchenkoalex
Copy link
Member

Hey, I saw you posted in the other issue that Kotlin wouldn't recognise source/sink, that was resolved? Right now, from what I could see, RN 0.65 update removed those lines (and I did in all my libraries)

compileOptions {
  sourceCompatibility JavaVersion.VERSION_1_8
  targetCompatibility JavaVersion.VERSION_1_8
}

your issue looks exactly like that. So you would need to use something that was before 0.65 update, or update your RN setup.

Also I saw that v2.1.3 for some reason did not work for you, you can try to use v1.0.3, or you can just see the code and copy it over to your project, or I believe there is a way to make this work using an original react-native-document-picker library without this one, see this comment react-native-documents/document-picker#70 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants