Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App not run on android #444

Closed
karuna2413 opened this issue Jul 1, 2024 · 12 comments
Closed

App not run on android #444

karuna2413 opened this issue Jul 1, 2024 · 12 comments
Assignees
Labels
crash Something is crashing platform-android Specific to Android platform support Asking for help writing an application

Comments

@karuna2413
Copy link

karuna2413 commented Jul 1, 2024

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

@NickTheDev
Copy link

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
Copy link

@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

@karuna2413
Copy link
Author

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
Copy link
Author

karuna2413 commented Jul 5, 2024

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

@SzymonDziak
Copy link

same issue

@deepak786
Copy link
Collaborator

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

@deepak786 deepak786 added platform-android Specific to Android platform crash Something is crashing labels Jul 10, 2024
@jpmangoit
Copy link

@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.

@kalsariyac
Copy link

@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
Copy link

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.

@deepak786
Copy link
Collaborator

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: 6cd517b

@deepak786 deepak786 added the support Asking for help writing an application label Aug 12, 2024
@deepak786 deepak786 self-assigned this Aug 12, 2024
@deepak786 deepak786 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
@deepak786
Copy link
Collaborator

Duplicate of #436

@deepak786 deepak786 marked this as a duplicate of #436 Aug 13, 2024
@nikunj-p-7span
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Something is crashing platform-android Specific to Android platform support Asking for help writing an application
Projects
None yet
Development

No branches or pull requests

7 participants