Paypal依赖项错误与现有项目

时间:2016-01-13 20:03:45

标签: android paypal gradle

我的应用程序运行正常,直到我将Paypal依赖项添加到我的应用程序using System; using NLog; using NLog.Targets; class Example { static void Main(string[] args) { MemoryTarget target = new MemoryTarget(); target.Layout = "${message}"; NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(target, LogLevel.Debug); Logger logger = LogManager.GetLogger("Example"); logger.Debug("log message"); foreach (string s in target.Logs) { Console.Write("logged: {0}", s); } // Access to target.Logs async. // Have I target.Logs.Clear() the Logs when I get all items? } }

错误是:

错误:任务':app:dexDebug'执行失败。

  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process' command' /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents /首页/斌/ java的''完成非零退出值2

我尝试了compile 'com.paypal.sdk:paypal-android-sdk:2.12.5'但也没有帮助。

这是我的build.gradle(模块:app)

multiDexEnabled true

1 个答案:

答案 0 :(得分:0)

将其添加到build.gradle(模块应用程序)

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

并添加依赖项

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

希望它适合你