Leanplum / Leanplum-Android-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
46 stars 40 forks source link

Build error with leanplum-fcm sdk 7.1+ #554

Closed Dazlonar closed 1 year ago

Dazlonar commented 1 year ago

Hello! We are currently using version com.leanplum:leanplum-fcm:5.10.2 and everything is working well. I'm trying to update SDK to the latest version 7.2.0, but I'm getting an error when building. I tried to find the latest version on which the building starts normally and this version is 7.0.1 Starting from version 7.1.0 I get the error described below.

Expected Behavior

Build apk - successful

Actual Behavior

When build starts - error occurred:

> Failed to transform artifact 'activity.aar (androidx.activity:activity:1.6.0-rc02)' to match attributes {artifactType=android-manifest}.
> Execution failed for JetifyTransform: C:\Users\user\.gradle\caches\modules-2\files-2.1\androidx.activity\activity\1.6.0-rc02\c5a2d4c868a2a8a841d291ae8ce6924af43e65dd\activity-1.6.0-rc02.aar.
> Failed to transform 'C:\Users\user\.gradle\caches\modules-2\files-2.1\androidx.activity\activity\1.6.0-rc02\c5a2d4c868a2a8a841d291ae8ce6924af43e65dd\activity-1.6.0-rc02.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)

> Failed to transform artifact 'annotation-experimental.aar (androidx.annotation:annotation-experimental:1.3.0)' to match attributes {artifactType=android-manifest}.
> Execution failed for JetifyTransform: C:\Users\user\.gradle\caches\modules-2\files-2.1\androidx.annotation\annotation-experimental\1.3.0\5087c6f545117dcd474e69e1a93cacec9d7334af\annotation-experimental-1.3.0.aar.
> Failed to transform 'C:\Users\user\.gradle\caches\modules-2\files-2.1\androidx.annotation\annotation-experimental\1.3.0\5087c6f545117dcd474e69e1a93cacec9d7334af\annotation-experimental-1.3.0.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)

Steps to Reproduce the Problem

  1. Set version of leanplum-fcm to 7.1+
  2. Build apk

Specifications

android.useAndroidX=true
android.enableJetifier=true

Project Level:

dependencies {
    classpath 'com.android.tools.build:gradle:3.4.3'
    classpath 'com.google.gms:google-services:4.3.13'
    classpath 'com.github.triplet.gradle:play-publisher:1.2.0'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
  }

App Level:

dependencies {
  implementation fileTree(include: ['*.jar'], dir: 'libs')
  implementation project(':libcocos2dx')
  implementation platform('com.google.firebase:firebase-bom:25.10.0')
  implementation 'commons-io:commons-io:2.6'
  implementation 'com.facebook.android:facebook-android-sdk:16.2.0'
  implementation 'com.google.android.gms:play-services-analytics:18.0.2'
  implementation 'com.google.android.play:core:1.10.3'
  implementation 'androidx.multidex:multidex:2.0.1'
  implementation 'androidx.multidex:multidex-instrumentation:2.0.0'
  implementation 'androidx.work:work-runtime:2.7.1'
  implementation 'com.sendbird.sdk:sendbird-chat:4.3.0'
  implementation 'com.google.firebase:firebase-core'
  implementation 'com.google.firebase:firebase-messaging:22.0.0'
  implementation 'com.google.firebase:firebase-crashlytics-ndk'
  implementation 'com.google.firebase:firebase-analytics'

  implementation 'com.leanplum:leanplum-fcm:7.2.0'

  implementation 'androidx.appcompat:appcompat:1.0.0'
  implementation 'com.google.android.material:material:1.0.0'
  implementation 'androidx.annotation:annotation:1.0.0'
  implementation 'androidx.browser:browser:1.0.0'
  implementation 'androidx.cardview:cardview:1.0.0'
  implementation 'androidx.recyclerview:recyclerview:1.0.0'
  implementation 'com.google.android.gms:play-services-games:21.0.0'
  implementation 'com.google.android.gms:play-services-auth:19.0.0'
  implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
  implementation 'androidx.navigation:navigation-fragment:2.0.0-rc02'
  implementation 'androidx.navigation:navigation-ui:2.0.0-rc02'
  implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  implementation 'com.helpshift:helpshift-sdkx:10.2.2'
  implementation 'com.appsflyer:af-android-sdk:6.12.3'
  implementation 'com.android.installreferrer:installreferrer:2.2'

  testImplementation 'junit:junit:4.12'

  implementation "com.android.billingclient:billing:6.0.1"
}
Dazlonar commented 1 year ago

I updated 'com.android.tools.build:gradle' to version 3.6.4 and it helped.