3

I've added compile group: 'org.json', name: 'json', version: '20160810' in build.gradle file for using updated version JSON. but, I got warnings with message saying

Warning:WARNING: Dependency org.json:json:20160810 is ignored for release as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.json:json:20160810 is ignored for debug as it may be conflicting with the internal version provided by Android.

how to resolve this?

I want to exclude org.json:json from android.jar file.

keep the compile group: 'org.json', name: 'json', version: '20160810'. how to do that.

enter image description here

I've tried adding

sourceSets {
        main {
            java {
                exclude 'org/json/**'
            }
        }
    }

but, didn't work.

Thanks in advance.

Kasim Rangwala
  • 1,765
  • 2
  • 23
  • 44
  • 1
    Hi Ka7Im1011, did you saw these links? https://github.com/socketio/engine.io-client-java/issues/13 http://stackoverflow.com/questions/32921328/dependency-org-jsonjson20090211-is-ignored-for-debug-as-it-may-be-conflicting – Jaco Nov 09 '16 at 07:53
  • 1
    Hi @Jaco I've seen your link but, that is not my case. I want to `exclude` `org.json:json` from `Android.jar` file. how to do that. – Kasim Rangwala Nov 09 '16 at 08:43
  • The only way I was able to solve this: https://stackoverflow.com/a/60196396/1438339 – Adam Johns Feb 12 '20 at 20:50

0 Answers0