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

Android build crashes after upgrading to Intercom 9.0.5/9.0.6. #439

Closed
florinleu opened this issue Jun 6, 2024 · 8 comments
Closed

Android build crashes after upgrading to Intercom 9.0.5/9.0.6. #439

florinleu opened this issue Jun 6, 2024 · 8 comments
Assignees
Labels
crash Something is crashing platform-android Specific to Android platform

Comments

@florinleu
Copy link

Environment:
Flutter 3.19.6/3.22.1
Intercom 9.0.5/9.0.6
VSCode 1.89.1
MacOS 14.5

When trying to build a release for Android I get the following error:
ERROR:/Users/builder/.gradle/caches/transforms-3/281d4165655ea893dd7147c4b25ba565/transformed/vectordrawable-animated-1.2.0-runtime.jar: R8: java.lang.NullPointerException: Cannot invoke "String.length()" because "" is null

A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable Compilation failed to complete, origin: /Users/builder/.gradle/caches/transforms-3/281d4165655ea893dd7147c4b25ba565/transformed/vectordrawable-animated-1.2.0-runtime.jar:androidx/vectordrawable/graphics/drawable/Animatable2Compat$AnimationCallback$1.class

@GabriellArthur
Copy link

I have the same problem.

@GabriellArthur
Copy link

Using bitrise to generate apk, it gives me this error:

ERROR:/Users/vagrant/.gradle/caches/transforms-3/81e565530d36f060670936a0807a9373/transformed/vectordrawable-animated-1.2.0-runtime.jar: R8: java.lang.NullPointerException
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:minifyDevReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete, origin: /Users/vagrant/.gradle/caches/transforms-3/81e565530d36f060670936a0807a9373/transformed/vectordrawable-animated-1.2.0-runtime.jar:androidx/vectordrawable/graphics/drawable/Animatable2Compat$AnimationCallback$1.class

A workaround to continue building. app and not stop development was to fix the intercom version at 9.0.0

intercom_flutter: 9.0.0

@deepak786
Copy link
Collaborator

Looks like the same issue #436

Can you please try updating your Gradle version same as the example app? #436 (comment)

@deepak786 deepak786 added platform-android Specific to Android platform crash Something is crashing labels Jun 6, 2024
@daniloapr
Copy link

Same here. I'm using the version 9.0.4 as recommended here

@greatschism
Copy link

Do any of you have it working with Flutter >3.19

@lucasfariasv
Copy link

I'm using Flutter 3.22.2 and intercom_flutter 9.0.7, I updated the version of gradle and kotlin and it worked, just as described here and here

@deepak786
Copy link
Collaborator

Duplicate of #436

@deepak786 deepak786 marked this as a duplicate of #436 Jul 10, 2024
@deepak786 deepak786 self-assigned this Aug 12, 2024
@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

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
Projects
None yet
Development

No branches or pull requests

6 participants