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

ERROR: Failed to resolve: org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.1.4-1 #143

Closed
GeeksEmpireOfficial opened this issue Aug 15, 2019 · 14 comments

Comments

@GeeksEmpireOfficial
Copy link

General information

  • SDK/Library version: 4.3.0
  • Environment: Sandbox
  • Android Version and Device: API 23+

ERROR: Failed to resolve: org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.1.4-1

I am getting mentioned error for; implementation "com.braintreepayments.api:drop-in:4.3.0"

@philburtenshaw
Copy link

Whilst not currently noted under the Drop-in UI section of the documentation, you will need to add the Cardinal Maven repository to your project, as the 4.3.0 version of the drop in requires it.

Details for this can be found in the 3DSecure Migration guide.
https://developers.braintreepayments.com/guides/3d-secure/migration/android/v3#update-your-sdk-version

@scannillo
Copy link
Contributor

Thank you for including these instructions @philburtenshaw ! These instructions should resolve your issue. We are working on getting docs out for the latest version of braintree-android-drop-in which supports 3DS 2.0.

Also, this brings up the point of ideally not requiring this cardinalmobile import if you are not using 3DS 2, yet wanting to use the latest version of our drop-in SDK. I'll bring this up to the team. Thanks for posting!

@GeeksEmpireOfficial
Copy link
Author

Whilst not currently noted under the Drop-in UI section of the documentation, you will need to add the Cardinal Maven repository to your project, as the 4.3.0 version of the drop in requires it.

Details for this can be found in the 3DSecure Migration guide.
https://developers.braintreepayments.com/guides/3d-secure/migration/android/v3#update-your-sdk-version

Thanks But It didn't help!
I have these in app-level gradle

implementation 'com.braintreepayments.api:drop-in:4.3.0'
implementation 'com.braintreepayments.api:three-d-secure:3.4.1'

& have this in project-level gradle

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

@scannillo
Copy link
Contributor

Is the snippet for the project-level gradle nested under repositories?

@GeeksEmpireOfficial
Copy link
Author

Is the snippet for the project-level gradle nested under repositories?

Yes.

@scannillo
Copy link
Contributor

scannillo commented Aug 19, 2019

Hello. I got some more details from @Epreuve on our team:

  • You don't need to include implementation 'com.braintreepayments.api:three-d-secure:3.4.1' since drop in V 4.3.0 will include it here.
  • Also, I found out that both snippets above should live in the app-level gradle.

Let us know if this works

@GeeksEmpireOfficial
Copy link
Author

Hello. I got some more details from @Epreuve on our team:

* You don't need to include `implementation 'com.braintreepayments.api:three-d-secure:3.4.1'` since drop in V 4.3.0 will include it [here](https://github.com/braintree/braintree-android-drop-in/blob/master/Drop-In/build.gradle#L63).

* Also, I found out that both snippets above should live in the app-level gradle.

Let us know if this works

No. It doesn't solve the issue!
& when I add this

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

in App-Level I get this error

In project 'BaseModule' a resolved Google Play services library dependency depends on another at an exact version (e.g. 
"[1.3.1,2.3]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

@Epreuve
Copy link
Member

Epreuve commented Aug 19, 2019

Add this to your App build.gradle as well.

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 reference, this is typically a bug cause by the Google Play Services plugin, as noted here. It incorrectly parses the version range of one of the Cardinal SDK dependencies and throws the error. This overwrites it and pins it to version 2.3 instead, avoiding the error.

@GeeksEmpireOfficial
Copy link
Author

GeeksEmpireOfficial commented Aug 20, 2019

Add this to your App build.gradle as well.

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 reference, this is typically a bug cause by the Google Play Services plugin, as noted here. It incorrectly parses the version range of one of the Cardinal SDK dependencies and throws the error. This overwrites it and pins it to version 2.3 instead, avoiding the error.

It solved by

googleServices {
    disableVersionCheck = true
}

But the main issue remains as

Could not find org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.1.4-1.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.1.4-1/cardinalmobilesdk-2.1.4-1.pom
  - https://dl.google.com/dl/android/maven2/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.1.4-1/cardinalmobilesdk-2.1.4-1.jar
  - https://jcenter.bintray.com/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.1.4-1/cardinalmobilesdk-2.1.4-1.pom
  - https://jcenter.bintray.com/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.1.4-1/cardinalmobilesdk-2.1.4-1.jar

& It doesn't need to be included in app-level gradle. I added this

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

under allprojects { repositories { { } in build.gradle and it worked. 👍

@abdullahjhussein
Copy link

abdullahjhussein commented Aug 21, 2019

Try to add Gradle Dependency as:
implementation ('com.braintreepayments.api:drop-in:4.3.0') {
transitive = false
}
this works for me
Good Luck

@ersen-lw
Copy link

ersen-lw commented Sep 3, 2019

Add this to your App build.gradle as well.

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 reference, this is typically a bug cause by the Google Play Services plugin, as noted here. It incorrectly parses the version range of one of the Cardinal SDK dependencies and throws the error. This overwrites it and pins it to version 2.3 instead, avoiding the error.

This worked for me but I had to place it in the dependencies closure like so

dependencies {

    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"
                    }
                }
            }
        }
    }

    //Your usual dependencies 
     implementation 'androidx.appcompat:appcompat:1.0.0'

@mukesh249
Copy link

implementation 'com.braintreepayments.api:drop-in:3.7.0'
implementation 'com.braintreepayments.api:braintree:2.16.0'

it's the perfect solution for me you can try this

@khuongdn16
Copy link

Hi, if anyone was able to resolve this issue, can I get some guidance. Much appreciated. I added below to app/build.graddle

dependencies {
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"
}
}
}
}
}
implementation 'io.card:android-sdk:5.+'
implementation 'com.braintreepayments.api:drop-in:3.7.0'
implementation 'com.braintreepayments.api:braintree:2.16.0'
}

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

However, I still have this error:

Could not resolve all task dependencies for configuration ':flutter_braintree:debugCompileClasspath'.
Could not find org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1.
Required by:
project :flutter_braintree > com.braintreepayments.api:three-d-secure:3.14.2

@bennibau
Copy link

bennibau commented Dec 29, 2020

you have to add to you app level build.gradle the depenency like so:

dependencies {
   .....
    implementation ('com.braintreepayments.api:drop-in:5.0.1') {
        transitive = false
    }
}

and to you android level build.gradle the mave repository like so:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants