Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Braintree Drop-in UI: ERROR: Failed to resolve: org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.1-2?

enter image description hereI am integrating Braintree Drop-in UI but my project is not getting compiled.. I have used below dependency:-

implementation 'com.braintreepayments.api:drop-in:4.5.0'
like image 274
Gaurang Goda Avatar asked Feb 07 '20 12:02

Gaurang Goda


3 Answers

Add this in you Project.gradle

rootProject.allprojects {
    repositories {
        maven {
            url  "https://cardinalcommerce.bintray.com/android"
            credentials {
                username 'braintree-team-sdk@cardinalcommerce'
                password '220cc9476025679c4e5c843666c27d97cfb0f951'
            }
        }
    }
}

You can also read more about this error here

Hope this will help!

like image 128
Rahul Gaur Avatar answered Nov 05 '22 04:11

Rahul Gaur


Please update below credentials and url in build.gradle(App Level) as of latest Braintree credentials have been updated.

Old Credentials

url  "https://cardinalcommerce.bintray.com/android"
username 'braintree-team-sdk@cardinalcommerce'
password '220cc9476025679c4e5c843666c27d97cfb0f951'

New Credentials

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
            credentials {
                username 'braintree_team_sdk'
                password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
            }
        }
    }
}

As per @Nik's answer If you're using the Google Play Services Gradle plugin, you will also need to add this to your build.gradle to avoid a dependency resolution issue:

components.all {
    allVariants {
        withDependencies { deps ->
            deps.each { dep ->
                if (dep.group == 'net.minidev' && dep.name =='json-smart') {
                    dep.version {
                        prefer "2.3"
                    }
                    dep.because "resolving dependencies issue"
                }
            }
        }
    }
}

For more info: https://developer.paypal.com/braintree/docs/guides/3d-secure/client-side/android/v3#generate-a-client-token

Related Git Thread regarding:

Unsafe implementation of the HostnameVerifier interface - Google policy violation

https://github.com/braintree/braintree-android-drop-in/issues/219

https://github.com/braintree/braintree-android-drop-in/issues/208

like image 21
MashukKhan Avatar answered Nov 05 '22 05:11

MashukKhan


In your project.gradle

repositories {
    maven {
        url "https://cardinalcommerce.bintray.com/android"
        credentials {
            username 'braintree_team_sdk'
            password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
        }
    }
}

If you're using the Google Play Services Gradle plugin, you will also need to add this to your build.gradle to avoid a dependency resolution issue:

dependencies {
    // Your dependency declarations...
    components.all {
        allVariants {
            withDependencies { deps ->
                deps.each { dep ->
                    if (dep.group == 'net.minidev' && dep.name =='json-smart') {
                            dep.version {
                                prefer "2.3"
                            }
                            dep.because "resolving dependencies issue"
                    }
                }
            }
        }
    }
}

For more info: https://developers.braintreepayments.com/guides/3d-secure/client-side/android/v3#generate-a-client-token

like image 3
Nik Avatar answered Nov 05 '22 06:11

Nik