rn-bridge / react-native-geofencing

Native modules to determine if a location is within defined geographical boundaries
MIT License
3 stars 4 forks source link

Android build error #9

Closed marekp97 closed 2 hours ago

marekp97 commented 1 day ago

Hi, I have a question, is it possible to add JavaVersion.VERSION_17 in build.gradle?

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

My application won't build with 1_8:

Execution failed for task ':rn-bridge_react-native-geofencing:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).

Maybe I can set something so that older libraries also work with this one?

HarshaR1642 commented 19 hours ago

@marekp97 Can you try setting the following in your build.gradle ? kotlinOptions { jvmTarget = "1.8" }

marekp97 commented 19 hours ago

No, then I get an error:

Gradle DSL method not found: 'kotlinOptions()'
Possible causes:
Your project may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).

My react-native version: 0.72

sriharshamadamanchi commented 19 hours ago

@marekp97 Can you try setting the same in library build.gradle as i was not able to reproduce the issue ? kotlinOptions { jvmTarget = "1.8" }

marekp97 commented 18 hours ago

@sriharshamadamanchi Yes, adding kotlinOptions { jvmTarget = "1.8" } in the library solves the problem too. Can you add it in build.gradle to the new version?

sriharshamadamanchi commented 3 hours ago

@marekp97 New version 1.0.3 is released with above change