我必须在我的应用程序中集成 Paypal,所以我得到了教程 here和 here .
在教程中,我发现下载 Jar
并添加为 library
。我无法在此链接中找到 jar 文件。它只有 aar 文件。
但是在link他们说对于 android stdio 这样做:
将 SDK 添加到您的项目
PayPal Android SDK
现在可在 Maven Repository
中使用。最新版本可通过 mavenCentral()
获得。只需从 mavenCentral()
添加以下依赖项:
compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'
所以我的 build.gradle
文件看起来像:
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'
}
获取错误:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not determine artifacts for com.paypal.sdk:paypal-android-sdk:2.13.1: No cached version available for offline mode
禁用 OFFILNE MODE AND SYNC
后需要很长时间。未完成 gradle sync
过程。
我无法在 android studio 中集成 Paypal... 有人告诉我我做错了什么以及如何整合吗? 谢谢。
最佳答案
3.0.1.jar和okio-1.6.0.jar最新jar文件
compile files('libs/okhttp-3.0.1.jar')
compile files('libs/okio-1.6.0.jar')
compile project(':PayPalAndroidSDK-2.13.1')
关于android - Paypal 集成错误 - Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35424269/