dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.73k stars 629 forks source link

Build Error After Upgrading to targetSDK 34 #2782

Closed haresh4d closed 1 day ago

haresh4d commented 1 week ago

I am getting following build error in android after upgrading to targetSDK 34

Failed to transform billing-ktx-7.0.0.aar (com.android.billingclient:billing-ktx:7.0.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=21, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.

hyochan commented 5 days ago

Could you try updating your build.gradle file like below?

// In your root build.gradle file
buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.0' // or a compatible version
    }
}

// In your gradle-wrapper.properties file
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip // or a compatible version

Also try to clean and rebuild

./gradlew clean
./gradlew build

If the issue persists, we need additional information to accurately diagnose the cause. Please provide the following details:

Providing this information will help us diagnose and resolve the issue more precisely.