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

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/stripe/android/stripe3ds2/service/StripeThreeDs2ServiceImpl; #1470

Closed
hamzabintariq123 opened this issue Sep 4, 2019 · 26 comments
Assignees
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@hamzabintariq123
Copy link

For 3D Secure 2.

when i update the library to

"com.stripe:stripe-android:10.4.2@aar"

i am getting this error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/stripe/android/stripe3ds2/service/StripeThreeDs2ServiceImpl;

when i initialise stripe using this : Stripe = Stripe(app,KR.strings.stripe_key) the application crashes .

Where is this class StripeThreeDs2ServiceImpl defined as i cannot see that in the library that you have given

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 thanks for filing. I'll have this fixed and issue a new release today.

@mshafrir-stripe mshafrir-stripe self-assigned this Sep 4, 2019
@mshafrir-stripe mshafrir-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Sep 4, 2019
@hamzabintariq123
Copy link
Author

@mshafrir Great 👍 Thanks for replying . looking forward for a quick new release as we are a little short on time and we have to make changes for 3DS2 .

@hamzabintariq123
Copy link
Author

@mshafrir and do we have a downgraded version which has 3DS2 support without this issue ?

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 can you show me how you list the SDK as a dependency in Gradle?

It should look something like this:

dependencies {
    implementation 'com.stripe:stripe-android:10.4.2'
}

I noticed you are referencing the aar directly. Can you try removing that?

@mshafrir-stripe
Copy link
Collaborator

Can you also share what versions of Android Gradle Plugin and Gradle you're using?

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 also, what version did you upgrade from?

@hamzabintariq123
Copy link
Author

  1. i have a separate dependencies file which i use in gradle .
    the dependency : const val libStripe = "com.stripe:stripe-android:10.4.2@aar" .
    which i use like this : implementation Deps.misc.libStripe .

@hamzabintariq123
Copy link
Author

Screenshot 2019-09-05 at 11 10 52 AM

@hamzabintariq123
Copy link
Author

@mshafrir-stripe i updated from "com.stripe:stripe-android:6.1.1@aar"

@mshafrir-stripe
Copy link
Collaborator

Please refer to our installation instructions: https://github.com/stripe/stripe-android/blob/master/README.md#installation

Your Gradle version is out of date. Also the way you are specifying the dependency is wrong. Please remove the @aar part.

@hamzabintariq123
Copy link
Author

@msaffitz-stripe do you have any version which is compatible with gradle 4.6 and have 3DS2 support . ? i am unable to update project to 5.1 as alot of libs that i use are crashing with 5.1 unfortunately :(

@mshafrir-stripe
Copy link
Collaborator

Have you tried just removing the @aar part of the dependency definition?

@hamzabintariq123
Copy link
Author

Yes tried that but no luck .

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 is it the same error without @aar, or a different error?

@hamzabintariq123
Copy link
Author

`In project 'app-guest' 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.

Dependency failing: com.nimbusds:nimbus-jose-jwt:7.2.1 -> net.minidev:json-smart@[1.3.1,2.3], but json-smart version was
2.3.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'stagingDebugCompileClasspath' which depends onto com.stripe:stripe-android@9.3.6

For extended debugging info execute Gradle from the command line with ./gradlew --info :app-guest:assembleDebug to see t
he dependency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at ht
tps://github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to
your build.gradle file.
`

@hamzabintariq123
Copy link
Author

a different one @mshafrir-stripe

@hamzabintariq123
Copy link
Author

tried to integrate an old one 9.3.6 but still the same error . this is the same error i get when i use 10.4.3 also

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 can you share the full list of dependencies you're using? Are you using net.minidev:json-smart elsewhere?

@hamzabintariq123
Copy link
Author

hamzabintariq123 commented Sep 6, 2019

no i dont think i am using it anywhere . @mshafrir-stripe

@hamzabintariq123
Copy link
Author

hamzabintariq123 commented Sep 6, 2019

its too big of a file @mshafrir-stripe . actually we create a different file for dependencies and use that in projects where we need .

@mshafrir-stripe
Copy link
Collaborator

You could also try this:

configurations.all {
        resolutionStrategy { 
            force 'net.minidev:json-smart:2.3'
    }
}

@hamzabintariq123
Copy link
Author

No luck @mshafrir-stripe . it is an internal dependency for com.nimbusds:nimbus-jose-jwt:7.8

but i am not using this any where in my project. Are you guys using it ?

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 yes, it's required for 3DS2. At this point I highly recommend upgrading to the recommended version of Gradle, since the version you're using is unsupported.

@hamzabintariq123
Copy link
Author

hamzabintariq123 commented Sep 6, 2019

when i upgrade to gradle 5.1.1 i get this error @mshafrir-stripe

Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

@mshafrir-stripe
Copy link
Collaborator

@hamzabintariq123 I'm not familiar with that error. Perhaps you can Google for similar instances of that error and see what the resolution was.

Please reopen this ticket if, once you've upgraded Gradle, you're still having issues.

@hamzabintariq123
Copy link
Author

@mshafrir-stripe Thanks anyway for your time . i,ll look what i can do with this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

2 participants