Paypal这里的android集成问题

时间:2016-04-22 05:28:07

标签: android paypal

我想在我的Android应用程序中集成Paypal ..

所以我跟着this

所以当我尝试使用这个示例应用程序代码时,我会得到像

这样的错误
Error:Execution failed for task ':app:processDebugResources'. 
Error: more than one library with package name 'com.paypal.merchant.sdk'

这里我使用了这两个aar文件 paypal-here-sdk.aarpaypal-here-sdk-debug.aar

我使用上面的aar文件作为New->模块 - >进口jar / aar filse ..

但我收到更多错误

在模块依赖项中,我有两个..

现在我遇到错误more than one library with package name 'com.paypal.merchant.sdk'

请建议我如何在我的自定义应用程序中使用此paypal ...作为支付网关....

1 个答案:

答案 0 :(得分:0)

将其添加到build.gradle(模块应用)文件中。

dependencies {
        compile 'com.paypal.sdk:paypal-android-sdk:2.14.1'
    }

不要添加任何jar文件 并在同一文件中添加此

android{  
    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'
        }
}