question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClassNotFoundException: com.braintreepayments.api.dropin.DropInRequest

See original GitHub issue

General information

  • SDK/Library version: API 27 | Braintree Android 2.6.2/Drop-in 3.1/Card 5.1.1
  • Gradle version: 4.4.1
  • Environment: Sandbox
  • Android Version and Device: Galaxy S7/7.0

Issue description

I’m working with this library in relation to the cordova-plugin-braintree library. Building the app works great, but when I tap on the drop-in UI, the app crashes and I see the following in the logs:

Class not found when unmarshalling: com.braintreepayments.api.dropin.DropInRequest
ClassNotFoundException: com.braintreepayments.api.dropin.DropInRequest

Here’s the gradle file for the plugin:

def packageName = getPackageName()

android {
    defaultConfig {
        applicationId packageName
    }
}

dependencies {
    compile 'com.braintreepayments.api:braintree:2.3.12'
    compile 'com.braintreepayments.api:drop-in:3.0.1'
    compile 'io.card:android-sdk:5.4.1'
}

def getPackageName() {
    def config = file("res/xml/config.xml").getText()
    def xml = new XmlParser(false, false).parseText(config)
    return xml.attribute("id")
}

I realize that this may not be directly related to the SDK, so just hoping for some pointers on what I might look for. Appreciated!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
codinronancommented, Feb 19, 2018

Yep we recently stopped supporting anything older than Android 4.4 so that helps immensely.

1reaction
codinronancommented, Feb 4, 2018

@jamesdixon hey dude so in and amongst trying to figure out why the latest Android SDK was causing a severe crash in android.support, I saw this error as well but it never actually causes the app to crash.

I believe - I don’t know for sure but I believe - that this is not a real error, caused by Cordova itself and the way it marshalls the object calls back and forth between native and the webview. The reason it doesn’t matter is because the Braintree Drop-In native code already knows about the class type so it is properly reconstructed on the other side; the class name cordova gives it is just a suggestion. I’m not sure the actual source of the error but I noticed that when the error occurs is long before the DropIn itself is actually invoked.

Anyway, it works beautifully with my latest changes over in the PR on Taraque’s repo, so even if it continues to be thrown we can ignore it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Braintree Integration - Error: Class not found: com ...
This works for me, try to remove this one implementation "com.braintreepayments.api:braintree:$braintree_version".
Read more >
DropInRequest (Drop-In API) - Javadoc.io
public class DropInRequest extends java.lang.Object implements android.os.Parcelable. Used to start DropInActivity with specified options.
Read more >
Braintree Drop-In SDK for Android
Class not found when unmarshalling: com.braintreepayments.api.dropin.DropInRequest ClassNotFoundException: com.braintreepayments.api.dropin.DropInRequest
Read more >
[Solved]-JVMTI class not prepared-Java - appsloveworld
... Class Not Found Exception in Java · Braintree Integration - Error: Class not found: com.braintreepayments.api.dropin.DropInRequest · enum class mapping ...
Read more >
com.braintreepayments.api.dropin.DropInRequest Java Exaples
This page shows Java code examples of com.braintreepayments.api.dropin.DropInRequest.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found