2016-02-16 52 views
1

我得寶在我的應用程序集成,因此我得到了教程herehere薪酬PAL積分誤差 - Android電子

在教程中,我發現,下載Jar並添加爲library。我不能在這個鏈接中找到jar文件。它只有一個文件。

但在link他們說Android的標準輸入輸出做到這一點:

的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中集成... 誰能告訴我什麼,我做錯了,如何整合? 謝謝。

+0

你添加了 編譯文件('libs/okhttp-3.0.1.jar') 編譯文件('libs/okio-1.6.0.jar') compile project(':PayPalAndroidSDK-2.13.1') 這些文件 –

回答

0

3.0.1.jar和奧基奧-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') 
+0

喜TQ,首先我需要爲這個我在哪裏PayPalAndroidSDK-2.13.1和其他庫 –

+0

您可以從GitHub下載jar文件 https://github.com/paypal/PayPal-Android -SDK/BLOB /主/文檔/ single_payment.md –

+0

並請貝寶帳戶添加CONFIG_CLIENT_ID –

0

添加到您的build.gradle這個(模塊的應用程序)

packagingOptions{ 
     exclude 'AndroidManifest.xml' 
     exclude 'lib/arm64-v8a/libcardioDecider.so' 
     exclude 'lib/arm64-v8a/libcardioRecognizer.so' 
     exclude 'lib/arm64-v8a/libcardioRecognizer_tegra2.so' 
     exclude 'lib/arm64-v8a/libopencv_core.so' 
     exclude 'lib/arm64-v8a/libopencv_imgproc.so' 
     exclude 'lib/armeabi/libcardioDecider.so' 
     exclude 'lib/armeabi-v7a/libcardioDecider.so' 
     exclude 'lib/armeabi-v7a/libcardioRecognizer.so' 
     exclude 'lib/armeabi-v7a/libcardioRecognizer_tegra2.so' 
     exclude 'lib/armeabi-v7a/libopencv_core.so' 
     exclude 'lib/armeabi-v7a/libopencv_imgproc.so' 
     exclude 'lib/mips/libcardioDecider.so' 
     exclude 'lib/x86/libcardioDecider.so' 
     exclude 'lib/x86/libcardioRecognizer.so' 
     exclude 'lib/x86/libcardioRecognizer_tegra2.so' 
     exclude 'lib/x86/libopencv_core.so' 
     exclude 'lib/x86/libopencv_imgproc.so' 
     exclude 'lib/x86_64/libcardioDecider.so' 
     exclude 'lib/x86_64/libcardioRecognizer.so' 
     exclude 'lib/x86_64/libcardioRecognizer_tegra2.so' 
     exclude 'lib/x86_64/libopencv_core.so' 
     exclude 'lib/x86_64/libopencv_imgproc.so' 
    } 

,並添加依賴

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.paypal.sdk:paypal-android-sdk:2.14.1' 
} 

希望它能適合你