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

Build is failing on Android after upgrading to 2.5.0. IOS working fine. #569

Open
DaniyalShaikh-0 opened this issue Jan 10, 2025 · 3 comments
Labels
question Further information is requested

Comments

@DaniyalShaikh-0
Copy link

DaniyalShaikh-0 commented Jan 10, 2025

Describe the bug
After upgrading to v2.5.0 from 2.4.0 inorder to fix the issue: search_controller_crash , the build fails on Android. It looked like incomptability issue with some library, but despite the upgrades, the build still fails with Exception Task :app:mergeExtDexSitDebug FAILED.

To Reproduce
Steps to reproduce the behavior:

  1. install 2.5.0 adyen version
    2.Go to 'cd android'
  2. './gradlew assembleDebug'
  3. See error > Task :app:mergeExtDexSitDebug FAILED

Expected behavior
The build should be successful as it is with the version 2.4.0.

Stack Traces

> Task :app:mergeExtDexSitDebug FAILED
ERROR:/Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
 
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeExtDexSitDebug'.
> Could not resolve all files for configuration ':app:sitDebugRuntimeClasspath'
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, 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: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.
   > Failed to transform fragment-1.8.5.aar (androidx.fragment:fragment:1.8.5) to match attributes {artifactType=android-dex, asm-transformed-variant=sitDebug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/user/.gradle/caches/transforms-3/e21b4a742ef330eaded788a2a91d7053/transformed/fragment-1.8.5-runtime.jar.
         > Error while dexing.

Desktop (please complete the following information):

  • OS: Mac OS 15.1 Sequoia
  • Android Studio v Android Studio Ladybug | 2024.2.1 Patch 2
  • React native - "0.69.12"
  • "@adyen/react-native": "2.5.0"
  • Gradle Version : "7.3.3"
  • AGP : "7.2.2"

Additional context
First we thought it's the issue with other dependencies, but even after updating we get the same error, and to remove that error we had to downgrade to "@adyen/react-native": "2.4.0" .

After that we also explore Multidexing as the error was for dexing, and followed this answer , However, we still got the same issue.

@DaniyalShaikh-0 DaniyalShaikh-0 added the bug report when a bug report is created label Jan 10, 2025
@descorp
Copy link
Contributor

descorp commented Jan 10, 2025

Hey @DaniyalShaikh-0

Thanks for reaching out.

This could be a Gradle issue.
What versions of Gradle and AGP are you using? You can check in Android Studio "File" -> "Project Structure"

@DaniyalShaikh-0
Copy link
Author

@descorp, Thank you for your message.
I have updated the issue with the Gradle and AGP version we are using

@descorp
Copy link
Contributor

descorp commented Jan 10, 2025

Thanks @DaniyalShaikh-0

Your both Gradle and AGP are old, I am afraid.
According to Google, Android API level 34 (all apps must target it since September 2024) requires AGP version 8.1 at least.

I would recommend updating React Native to at least 0.74


Alternatively you can just try to change following lines

In /android/build.gradle:

classpath("com.android.tools.build:gradle:8.6.1")

In /android/gradle/wrapper/gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

If none of the options above are suitable for you - try "solution" from a Google Issue tracker.

@descorp descorp added question Further information is requested and removed bug report when a bug report is created labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants