zoho / salesiq-mobilisten-flutter

SalesIQ Mobilisten plugin for Flutter.
https://mobilisten.io
MIT License
12 stars 10 forks source link

Gradle compatibility issues on Android from the salesiq-moilisten gradle module #69

Open henryadebayo opened 5 days ago

henryadebayo commented 5 days ago

here is the error message ==>

FAILURE: Build failed with an exception.

it appears that you guys are using

" ext.kotlin_version = '1.3.50'" in your plugin build.gradle file the file directory is "zoho_chat/android/gradle"

and flutter version 3.22.2 requires gradle version too be "1.5.20" and above this is causing the android build to fail

are there any work arounds or fixes ?

PS: i have tried to update the version myself but it just won't work . but the IOS part is fine

bhahirathan-mb-11956 commented 4 days ago

Hi @henryadebayo,

We apologize for the inconvenience caused.

FAILURE: Build failed with an exception.

What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':zoho_chat' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

As per your error logs, it asks you to upgrade the kotlin gradle version from 1.3.50 to 1.5.20 or above. Can you please update the version and verify once?

Sample code:

org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20

Regards, Bhahirathan M Zoho SalesIQ.

henryadebayo commented 4 days ago

i tried updating the kotlin-gladle version in my project/build.gradle and also in the zoho_chat sdk but still it did not work but when ever i take out the zohochat integration from androis it works perfectly here is the new error i am getting = >

" This will generate a JSON format file containing all messages that need to be translated. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: /Users/Marvel/.pub-cache/hosted/pub.dev/salesiq_mobilisten-6.3.0/android/src/main/java/com/zohosalesiq/plugin/MobilistenPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/Marvel/.pub-cache/hosted/pub.dev/salesiq_mobilisten-6.3.0/android/src/main/java/com/zohosalesiq/plugin/MobilistenPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. e: /Users/Marvel/.gradle/caches/transforms-3/0b48283451413139bbc206a8e2dd60dc/transformed/jetified-kotlin-stdlib-1.9.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: /Users/Marvel/.gradle/caches/transforms-3/0b48283451413139bbc206a8e2dd60dc/transformed/jetified-kotlin-stdlib-1.9.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: /Users/Marvel/.gradle/caches/transforms-3/0b48283451413139bbc206a8e2dd60dc/transformed/jetified-kotlin-stdlib-1.9.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: /Users/Marvel/.gradle/caches/transforms-3/12f2ff0a16f4d56e4e21a5c01309a152/transformed/jetified-mobilisten-8.0.5-api.jar!/META-INF/app_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: /Users/Marvel/.gradle/caches/transforms-3/5c4af0da34fbefb8be246f1b6745afca/transformed/jetified-kotlin-stdlib-common-1.9.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:compileProductionDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details "

YOU GUYS HAVE TO RESOLVE THIS FROM YOUR PLUGIN

bhahirathan-mb-11956 commented 1 day ago

@henryadebayo The error you're encountering is due to the Kotlin version in your project. Previously, your Android plugin required Kotlin Gradle version 1.5.20, but the Mobilisten SDK now requires version 1.9.0. The Mobilisten SDK currently uses Kotlin version 1.9.10.

Please update the Kotlin version of your project and verify the changes.

Sample snippets: project/android/build.gradle

plugins {
    id("org.jetbrains.kotlin.android") version "1.9.23" apply false
}

project/android/build.gradle

buildscript {
    ext {
        kotlin_version = '1.9.10'
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.android.tools.build:gradle:8.0.2'
    }
}

If the issue persists, feel free to reach out to our support team via live chat from your SalesIQ by clicking on the profile picture in the top right corner and on "Chat with us" or by emailing us at (support@zohosalesiq.com) for further assistance.

henryadebayo commented 17 hours ago

@bhahirathan-mb-11956 Good day i am still encountering this issue and i am certain it is not because of my in app or project gradle version but cause of your 'zoho_chat' plugin gradle version here is a screenshoot of my projects build.gradle file Screenshot 2024-10-14 at 8 19 37 AM

notice that my gradle version is at 7.3.0 and my ext.kotlin_version is 1.9.10

and here is a screen shoot of your 'zoho_chat' plugin build.gradle file

Screenshot 2024-10-14 at 8 21 54 AM

notice that your gradle version is at 4.1.0 and your ext.kotlin_version is 1.3.50

the name of my Project is not 'Zoho_chat' that's the name of your plugin and the log is pointing at your plugin Screenshot 2024-10-14 at 8 19 11 AM