我在 Android Studio gradle 中使用了以下依赖项。
dependencies {
compile project(':facebookSDK')
compile project(':wheel')
compile project(':viewPagerLibrary')
compile 'com.google.code.gson:gson:2.1'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'io.card:android-sdk:5.0.0'
compile files('libs/acra-4.5.0.jar')
compile files('libs/analytics-3.4.0.jar')
compile files('libs/androidasync-1.3.8.jar')
compile files('libs/crashlytics.jar')
compile files('libs/CWAC-Adapter.jar')
compile files('libs/eventbus-2.2.0.jar')
compile files('libs/fastjson-1.1.6.jar')
compile files('libs/gradle-wrapper.jar')
compile files('libs/ion-1.3.8.jar')
compile files('libs/localytics.jar')
compile files('libs/nineoldandroids.jar')
compile files('libs/parse-1.3.0.jar')
compile files('libs/socialauth-4.4.jar')
compile files('libs/universal-image-loader-1.9.0.jar')
}
现在我需要实现 Braintree Gradle 依赖
compile 'com.braintreepayments.api:braintree:1.+'
但有时它会向我显示一些其他错误,有时它会向我显示 java.exe 以非零退出值 3 完成。
我想使用这个 Braintree 依赖项作为付款选项,请帮助我了解如何在当前依赖项下使用它而不会出现错误。
非常感谢您提前解决了我的问题。
最佳答案
Braintree Android 库依赖于 GSON 版本 2.2.4 或更高版本。看起来您当前依赖于版本 2.1.0
。将您的依赖项升级到 2.2.+
应该满足 Braintree 的要求并允许安装。
如果您遇到其他问题,Braintree 的支持可以提供帮助,请发送电子邮件至 [email protected]或调用 877.434.2894。
关于android - Braintree 从 Gradle 中排除库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29514807/