安卓Braintree,贝宝不工作
收到此错误
Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;
我使用Kotlin顺便说一句,如果这是有用的信息。
重复步骤
-
调用这个方法
有趣的onBraintreeSubmit(){val dropInRequest = DropInRequest()。clientToken(clientToken)startActivityForResult(dropInRequest.getIntent(this),REQUEST_CODE_PAY)}
-
选择贝宝
- 点击继续沙盒购买
我按照这里的设置链接
在我的应用程序级别build.gradle
compile 'com.braintreepayments.api:braintree:2.9.0' compile 'com.braintreepayments.api:drop-in:3.+'
在主要活动
在创造我做
braintreeFragment = BraintreeFragment.newInstance(this@MainActivity, clientToken) braintreeFragment.addListener(this@MainActivity)
我还有一个初始化DropIn val的click监听器dropInRequest = DropInRequest().clientToken(clientToken)startActivityForResult(dropInRequest.getIntent(this),REQUEST_CODE_PAY)
clientToken是来自文档的示例标记
eyJ2ZXJzaW9uIj...ib2ZmIn0=
我也看到了问题#109,所以我试着做一个编译'com.google.android.gms:play-services:8.4.0'
但似乎打破了我的项目。
只是想了解是什么导致了错误
谢谢