在#battlehack尝试使用braintree API - 有谁知道我是否可以禁用钱包支持?我所做的就是:
Intent intent = new Intent(this, BraintreePaymentActivity.class);
intent.putExtra(BraintreePaymentActivity.EXTRA_CLIENT_TOKEN,
"myToken");
startActivityForResult(intent, 100);
它像这样崩溃:
E/AndroidRuntime(32508): Process: org.c_base.yealetsdothat, PID: 32508
E/AndroidRuntime(32508): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/wallet/Cart;
E/AndroidRuntime(32508): at com.braintreepayments.api.dropin.BraintreePaymentActivity.getAndroidPayCart(BraintreePaymentActivity.java:397)
E/AndroidRuntime(32508): at com.braintreepayments.api.dropin.AddPaymentMethodViewController.initViews(AddPaymentMethodViewController.java:67)
E/AndroidRuntime(32508): at com.braintreepayments.api.dropin.AddPaymentMethodViewController.<init>(AddPaymentMethodViewController.java:54)
E/AndroidRuntime(32508): at com.braintreepayments.api.dropin.BraintreePaymentActivity.initAddPaymentMethodView(BraintreePaymentActivity.java:332)
E/AndroidRuntime(32508): at com.braintreepayments.api.dropin.BraintreePaymentActivity.showAddPaymentMethodView(BraintreePaymentActivity.java:323)
E/AndroidRuntime(32508): at com.braintreepayments.api.dropin.BraintreePaymentActivity.onPaymentMethodsUpdated(BraintreePaymentActivity.java:205)
E/AndroidRuntime(32508): at com.braintreepayments.api.Braintree$12$1.run(Braintree.java:1119)
E/AndroidRuntime(32508): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(32508): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(32508): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(32508): at android.app.ActivityThread.main(ActivityThread.java:5944)
E/AndroidRuntime(32508): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32508): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(32508): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
E/AndroidRuntime(32508): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/AndroidRuntime(32508): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.wallet.Cart" on path: DexPathList[[zip file "/data/app/org.c_base.yealetsdothat-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AndroidRuntime(32508): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(32508): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(32508): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime(32508): ... 15 more
E/AndroidRuntime(32508): Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.wallet.Cart
E/AndroidRuntime(32508): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(32508): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime(32508): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime(32508): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime(32508): ... 16 more
E/AndroidRuntime(32508): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
当然我可以添加GMS - 但是我不能分发例如在FDroid上 - 有没有办法在不使用GMS / Wallet的情况下使用braintree API?
答案 0 :(得分:1)
在2015年6月23日发布的版本1.6.2中修复了崩溃。