Adding JsonPath in Android Studio causes non-zero exit value 2 error

前端 未结 2 535
暖寄归人
暖寄归人 2021-01-21 03:46

When I add the JsonPath library to my Android Studio (1.4) project I get an error as following:

Error:Execution failed for task \':app:dexDebug\'. \\>
com.an         


        
相关标签:
2条回答
  • 2021-01-21 03:59

    If you add compile 'net.minidev:json-smart:2.2', the problem will be resolved.

    For more background on the problem, see https://github.com/jayway/JsonPath/issues/116 and https://github.com/jayway/JsonPath/pull/108. Version 2.1.0 of json-path, which hasn't been released yet, will point to the 2.2 version of json-smart, resolving this issue. Until then the above workaround is necessary.

    0 讨论(0)
  • 2021-01-21 03:59

    in your build.gradle file add following codes :

        defaultConfig {
         multiDexEnabled true
         minSdkVersion 15
         targetSdkVersion 23
         versionCode 1
         versionName "1.0"
       }
    
       dexOptions {
         javaMaxHeapSize "4g"
     }
    
    0 讨论(0)
提交回复
热议问题