intercom_flutter icon indicating copy to clipboard operation
intercom_flutter copied to clipboard

App not run on android

Open karuna2413 opened this issue 1 year ago • 6 comments

I am unable to run the app on Android. The app runs perfectly on Chrome but not on Android.getting errors of kotlin latest version update related. Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. The class is loaded from /home/chirag/.gradle/caches/transforms-3/a18e86742e01f373d28c7f0b41fd2e27/transformed/jetified-kotlin-stdlib-1.9.22.jar!/kotlin/Unit.class

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':intercom_flutter:compileReleaseKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details

karuna2413 avatar Jul 01 '24 12:07 karuna2413

Getting this error as well-this seems like a huge issue as intercom_flutter flat out doesn't compile on a fresh flutter project 1.22+

NickTheDev avatar Jul 04 '24 00:07 NickTheDev

@karuna2413 was able to solve this by changing

id "org.jetbrains.kotlin.android" version "1.7.10" apply false

to

id "org.jetbrains.kotlin.android" version "1.9.21" apply false

in android/settings.gradle

NickTheDev avatar Jul 04 '24 13:07 NickTheDev

After adding this line in settings.gradle: id "org.jetbrains.kotlin.android" version "1.9.21" apply false then running the app results in this error:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction /home/chirag/.gradle/caches/transforms-3/2d2df7de2d1cd6cb4731a553b01e47e8/transformed/intercom-sdk-15.9.1/META-INF/com/android/build/gradle/aar-metadata.properties (No such file or directory)

karuna2413 avatar Jul 05 '24 07:07 karuna2413

@NickTheDev which version of flutter and flutter_intercom you are using?

karuna2413 avatar Jul 05 '24 08:07 karuna2413

same issue

SzymonDziak avatar Jul 08 '24 01:07 SzymonDziak

Please test the example app and update your gradle version same as the example app.

deepak786 avatar Jul 10 '24 20:07 deepak786

@deepak786 I tested the example app, and it's working fine. I also updated the Gradle version in my app, but I'm still encountering the same issue.

jpmangoit avatar Jul 17 '24 06:07 jpmangoit

@deepak786 I tested the example app, and it's working fine. I also updated the Gradle version in my app, but I'm still encountering the same issue.

Same for me

kalsariyac avatar Jul 19 '24 09:07 kalsariyac

Please test the example app and update your gradle version same as the example app.

@deepak786 You can reproduce the issue by creating the new Flutter project using 3.22.2 version.

kalsariyac avatar Jul 24 '24 06:07 kalsariyac

You need to use AGP version 8. Please follow the below steps:

  • android/app/build.gradle Make sure to add the following under android section
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }
  • android/gradle/wrapper/gradle-wrapper.properties Update your distributionUrl
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
  • android/settings.gradle
id "com.android.application" version "8.1.4" apply false
id "org.jetbrains.kotlin.android" version "1.9.21" apply false

For ref see this commit: https://github.com/v3rm0n/intercom_flutter/commit/6cd517bf146b88e49e22b4ebe9588dcdce02e918

deepak786 avatar Aug 12 '24 22:08 deepak786

Duplicate of https://github.com/v3rm0n/intercom_flutter/issues/436

deepak786 avatar Aug 13 '24 16:08 deepak786

You can reproduce the issue by creating the new Flutter project using 3.24.0 version.

It's not working for me still getting an Error.

nikunj-p-7span avatar Nov 18 '24 09:11 nikunj-p-7span