Skip to main content
Question

Issues building with purchases_ui_flutter


Forum|alt.badge.img+2

When using purchases_ui_flutter I get the following errors when trying to run a debug build:

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform lifecycle-livedata-core-2.8.3.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.3) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=26, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: C:\Users\porta\.gradle\caches\8.9\transforms\02266809379a8c0cb61126b0d331cfeb\transformed\lifecycle-livedata-core-2.8.3-runtime.jar.
         > Error while dexing.
   > Failed to transform constraintlayout-core-1.1.0.jar (androidx.constraintlayout:constraintlayout-core:1.1.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=26, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: C:\Users\porta\.gradle\caches\8.9\transforms\88b7639edd820d3f3621fa2344eae7ba\transformed\jetified-constraintlayout-core-1.1.0.jar.
         > Error while dexing.


Upgrading my gradle build tools fixes this issue however it then breaks the entire app on release instead so even though it builds the app will only work correctly in a debug mode. I’ve been stumped on this for hours and nobody seems to have the same issue as me.

4 replies

Forum|alt.badge.img+3

Facing similar issue with release build.

 

> Task :app:mergeExtDexStagingRelease
ERROR:/home/runner/.gradle/caches/transforms-3/074d16719b574db2ca68d26e7648ab05/transformed/lifecycle-livedata-core-2.8.3-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
ERROR:/home/runner/.gradle/caches/transforms-3/7b33f512daa046f0db341d77b0ced49b/transformed/jetified-constraintlayout-core-1.1.0.jar: D8: java.lang.NullPointerException

> Task :app:mergeExtDexStagingRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeExtDexStagingRelease'.
> Could not resolve all files for configuration ':app:stagingReleaseRuntimeClasspath'.
   > Failed to transform lifecycle-livedata-core-2.8.3.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.3) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=false, dexing-min-sdk=26, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/runner/.gradle/caches/transforms-3/074d16719b574db2ca68d26e7648ab05/transformed/lifecycle-livedata-core-2.8.3-runtime.jar.
         > Error while dexing.
   > Failed to transform lifecycle-livedata-core-2.8.3.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.3) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=false, dexing-min-sdk=26, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/runner/.gradle/caches/transforms-3/074d16719b574db2ca68d26e7648ab05/transformed/lifecycle-livedata-core-2.8.3-runtime.jar.
         > Error while dexing.
   > Failed to transform constraintlayout-core-1.1.0.jar (androidx.constraintlayout:constraintlayout-core:1.1.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=false, dexing-min-sdk=26, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/runner/.gradle/caches/transforms-3/7b33f512daa046f0db341d77b0ced49b/transformed/jetified-constraintlayout-core-1.1.0.jar.
         > Error while dexing.

 


Forum|alt.badge.img+2
  • Author
  • New Member
  • 2 replies
  • March 9, 2025

I managed to get purchases_ui_flutter: 8.4.0 working but its using a default paywall now not my template one since it isn’t the latest version.

I think what I did was add the following to my dependencies in app\build.gradle.

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

I then added the following inside of the allproject{} block in android\build.gradle:
 

    subprojects {
        afterEvaluate { project ->
            if (project.hasProperty('android')) {
                project.android {
                    if (namespace == null) {
                        namespace project.group
                    }
                }
            }
        }
    }
I cleared my dart pub cache and ran flutter clean then it all seemed to work. As far as I can remember those are the steps I took.If not then version 8.1.5 of purchases_ui_flutter seems to work and this tutorial worked for me: https://onlyflutter.com/show-paywalls-in-flutter-using-revenuecat/. I am still having the same initial issue from my post with the latest version of purchases_ui_flutter with those changes. 8.4.0 seems to be the highest I can go so far.

Forum|alt.badge.img+3

I’m actually using react-native so not sure if this is applicable to that

andrew-e wrote:

I managed to get purchases_ui_flutter: 8.4.0 working but its using a default paywall now not my template one since it isn’t the latest version.

I think what I did was add the following to my dependencies in app\build.gradle.

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

I then added:

 

subprojects {    afterEvaluate { project ->        if (project.hasProperty('android')) {            project.android {                if (namespace == null) {                    namespace project.group                }            }        }    }}Inside of the allproject{} block in android\build.gradleI cleared my dart pub cache and ran flutter clean then it all seemed to work. As far as I can remember those are the steps I took. If not then version 8.1.5 of purchases_ui_flutter seems to work and this tutorial worked for me:https://onlyflutter.com/show-paywalls-in-flutter-using-revenuecat/I am still having the same initial issue from my post with the latest version of purchases_ui_flutter with those changes. 8.4.0 seems to be the highest I can go so far.

 


Forum|alt.badge.img+2
  • Author
  • New Member
  • 2 replies
  • March 9, 2025

The gradle stuff may be worth a try since the errors look to be the same as what I was facing. However I believe those specific errors with lifecycle-livedata-core and constraintlayout-core were only fixed by going down one or two major versions of the payment ui package.

Try downgrading your package and see if it fixes it. It isn’t ideal since the paywall may not use the template you made if the react version is similar to flutter but the actual functionality should work.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings