Good day. In my application, I use a samopisky library in Java that uses the org.json dependency: json: 20151123.
In android, the default is another version. The question is - how can I use the JSON version from the library in the android project? I tried to prescribe in build.gradle
dependencies { compile "org.json:json:20151123" } I also copied the jar to the libs folder, but the first one gave rise to warnings, which said that the android-json version is more important, and the second one just did not allow to build apk with an error:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/json/CDL; The question is - how can I use the version of org.json I need in android?