customerio / customerio-android

This is the official Customer.io SDK for Android.
MIT License
12 stars 9 forks source link

Error on install CustomerIO tracking and messaging-push-fcm: Record requires ASM8 #180

Closed thiaagodev closed 1 year ago

thiaagodev commented 1 year ago

Target SDK: 31 Min SDK: 21 Kotlin Version: 1.6.10 Gradle Wrapper: https\://services.gradle.org/distributions/gradle-7.3.3-all.zip Gradle Android: com.android.tools.build:gradle:7.0.4 JVM: 11

Error Log on Build:

Execution failed for task ':app:transformClassesWithRealmTransformerForHomolog'.
> Could not resolve all files for configuration ':app:homologRuntimeClasspath'.
   > Failed to transform moshi-1.14.0.jar (com.squareup.moshi:moshi:1.14.0) to match attributes {artifactType=android-asm-instrumented-jars, asm-transformed-variant=homolog, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for AsmClassesTransform: /home/thiago/.gradle/caches/transforms-3/8d8b915a258fe961ebeefbe46c277915/transformed/jetified-moshi-1.14.0.jar.
         > Record requires ASM8

I have been add the CustomerIO libs, but when i try build my project this error hapens, i have tryed upgrade ASM to version 8, add moshi to ignorelist in Jetifier, and even disable Jetifier, but nothing works.

I have a long time in this bug, and nothing of i view in web works.

Can you help me?

mrehan27 commented 1 year ago

Hey @thiaagodev. Sorry to hear this. I can see you have mentioned trying similar solutions before too. But I would still like to reconfirm as these solutions have worked well in the past for our customers.

Upgrading your gradle version (Recommended Solution)

Upgrading your gradle version to at least 7.2.X using Android Gradle plugin Upgrade Assistant in Android Studio

Adding moshi to ignorelist (Fallback Solution)

In case you cannot upgrade your gradle version, you can temporarily add moshi to ignorelist by adding the following line to your gradle.properties

android.jetifier.ignorelist=moshi-1.14.0
thiaagodev commented 1 year ago

Hi @mrehan27, upgrading gradle version to 7.2.2 worked! Thank you.