zoho / SalesIQ-Mobilisten-ReactNative

Your mobile app's ideal live chat partner. Power up your mobile App with the SalesIQ Mobilisten SDK for React-Native.
https://mobilisten.io/
9 stars 11 forks source link

Unable to build android app #64

Closed dsound-zz closed 1 year ago

dsound-zz commented 1 year ago

We're trying to implement Zoho SalesIQ chat widget in our app. We have it working on web and ios but not Android. We've followed the docs:

https://www.zoho.com/salesiq/help/developer-guides/android-mobile-sdk-installation-2.0.html

The error on android build is:

error: lambda expressions are not supported in -source 7

Here's a screen shot:

Screen Shot 2022-12-22 at 11 42 15_copy

"react-native": "0.67.5", "react-native-zohosalesiq-mobilisten": "^4.2.17", running openjdk 11.0.17 locally

At first we thought it was an issue with linking but react-native says that manual linking is not required after version 5.9.

Is it a Java issue?

globerSaru37 commented 1 year ago

@dsound-zz In case it helps, we just tried building Android with version 4.2.14 and it works smoothly.

Maybe something went wrong with the latest releases? this error starts showing up on 4.2.15

bhahirathan-mb-11956 commented 1 year ago

Hi @dsound-zz and @globerSaru37 ,

Thanks for writing to us.

lambda expressions are not supported in -source 7

(use -source 8 or higher to enable lambda expressions)

The above error states that your react-native android project is using JDK 7. So, please upgrade the JDK to version 8 or above to resolve this issue.

Regards, Bhahirathan M, Zoho SalesIQ.

gabrielkabral commented 1 year ago

@DavidBhahirathan Actually the project has the JDK 8. I tried with the new release 5.0.0 and got the same error.

The only way that I'm able to run Android here, after 4.2.14, is adding these lines in node_modules/react-native-zohosalesiq-mobilisten/android/build.gradle

compileOptions {
   sourceCompatibility JavaVersion.VERSION_1_8
   targetCompatibility JavaVersion.VERSION_1_8
}

My app/build.gradle already has this config.

Is it possible to add these lines in the next release?