Receiving error with Paypal DropIn
See original GitHub issueGeneral information
- Sandbox
- [Emulator] Nexus 6P - 7.0
- [Actual device] Nexus 5 - 6.0.1
Receiving this error
Rejecting re-init on previously-failed class java.lang.Class<com.braintreepayments.api.BraintreeFragment$15>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;
I’m using Kotlin btw, if that’s helpful information.
Steps to replicate
- Call this method
fun onBraintreeSubmit() {
val dropInRequest = DropInRequest()
.clientToken(clientToken)
startActivityForResult(dropInRequest.getIntent(this), REQUEST_CODE_PAY)
}
- Select Paypal
- Tap Proceed with Sandbox Purchase
I followed the setup links here
On my app level build.gradle i have
compile 'com.braintreepayments.api:braintree:2.9.0'
compile 'com.braintreepayments.api:drop-in:3.+'
On the MainActivity
- In oncreate I do
braintreeFragment = BraintreeFragment.newInstance(this@MainActivity, clientToken)
braintreeFragment.addListener(this@MainActivity)
- I also have a click listener that initializes a DropIn
val dropInRequest = DropInRequest()
.clientToken(clientToken)
startActivityForResult(dropInRequest.getIntent(this), REQUEST_CODE_PAY)
Where the clientToken is the sample token from the docs
eyJ2ZXJzaW9uIj...ib2ZmIn0=
I also saw issue #109 so I tried doing a compile 'com.google.android.gms:play-services:8.4.0'
But it seems to break my project.
Just want to understand what’s causing the error
Thank you
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Authorization - Braintree Developer Documentation
Code Text Type
2000 Do Not Honor Soft
2001 Insufficient Funds Soft
2002 Limit Exceeded Soft
Read more >Braintree dropinUI not working with Paypal "Client Error"
I am using the drop-in UI. However, whenever I click on the PayPal option, it closes the payment menu and kicks back the...
Read more >Dropin - Documentation - Braintree Open Source
This class represents a Drop-in component, that will create a pre-made UI for accepting cards and PayPal on your page. Instances of this...
Read more >PayPal Drop-in integration - Adyen Docs
Our Android Drop-in renders PayPal in your payment form, and redirects the shopper to complete the payment. As with other redirect payment methods, ......
Read more >Drop-in UI | Customization | JavaScript - Braintree
This is useful when the transaction fails and you want to show an error ... when the customer selects a new payment method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To add, after applying the plugin in my app/build.gradle
classpath ‘com.google.gms:google-services:3.1.1’
I get
Version: 8.4.0 is lower than the minimum version (9.0.0) required for google-services plugin.
On Wed, Jan 31, 2018 at 11:30 AM, Ramon Salvador rjnsalvador@gmail.com wrote:
Okay, so I removed the braintree dependency. so now I only have and its not breaking anymore
compile ‘com.google.android.gms:play-services:8.4.0’
compile ‘com.braintreepayments.api:drop-in:3.+’
But I get an error below GoogleService failed to initialize, status: 10, Missing an expected resource: ‘R.string.google_app_id’ for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
Should I register my project on the Firebase console? Going to this link https://developers.google.com/mobile/add, after adding my app name and package, it makes me choose among Sign in, Analytics and Cloud messaging. Which should be chosen here to get a google-services.json.
I think you should include this part on your docs as well… hmmm
On Wed, Jan 31, 2018 at 4:38 AM, Blade Barringer notifications@github.com wrote: