Tipsi-stripe: build fails with an exception for task ':app:transformClassesWithDexBuilderForDebug' after installing tipsi-stripe

Created on 15 Jun 2019  路  3Comments  路  Source: tipsi/tipsi-stripe

Before I have submitted the issue

[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I've read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

I'm building an Android app in react-native and I need to add a payment page with Stripe. After I run yarn add tipsi-stripe and react-native link tipsi-stripe builds are failing with an exception for task ':app:transformClassesWithDexBuilderForDebug'.

Environment

  • tipsi-stripe version: 7.5.0
  • Last tipsi-stripe version where the issue was not reproduced (if applicable):
  • iOS or Android: Android
  • OS version: Android 9.0
  • React-Native version: 0.59.9
  • (Android only) com.google.firebase:firebase-core version:
  • (Android only) com.google.android.gms:play-services-base version:

Links to logs and sources

For Android, please provide the following sections from android/app/build.gradle:

  • android.compileSdkVersion = 28
  • android.buildToolsVersion = 28.0.3
  • android.defaultConfig.minSdkVersion = 16
  • android.defaultConfig.targetSdkVersion = 28
  • android.defaultConfig.multiDexEnabled (if exists)

Code To Reproduce Issue (Good To Have)

https://github.com/proud-stories/proud-stories

Most helpful comment

Sorry for creating this issue. I could fix this problem by adding these lines to android/app/build.gradle:

    implementation 'com.android.support:design:27.1.0'
    compile 'com.android.support:multidex:1.0.3'
    compile (project(':tipsi-stripe')) {
        exclude group: 'com.google.android.gms'
        exclude group: 'com.google.firebase'
        }
}

and also adding multiDexEnabled true to defaultConfig

All 3 comments

Sorry for creating this issue. I could fix this problem by adding these lines to android/app/build.gradle:

    implementation 'com.android.support:design:27.1.0'
    compile 'com.android.support:multidex:1.0.3'
    compile (project(':tipsi-stripe')) {
        exclude group: 'com.google.android.gms'
        exclude group: 'com.google.firebase'
        }
}

and also adding multiDexEnabled true to defaultConfig

God, you saved me. thanks very much.
Out of curiosity,
How could you come up with this solution?

I'm glad to hear it :) It cost me whole day of frustration.
I found the solution in one of the past GitHub issues but right now I can't remember exactly where.

Was this page helpful?
0 / 5 - 0 ratings