The org.json: json: 20090211 dependency is ignored for debugging, as it may conflict with the internal version provided by Android

While I am running Android Studio, the following warning appears:

The org.json: json: 20090211 dependency is ignored for debugging, as this may conflict with the internal version provided by Android. In case of a problem, repacking with jarjar to change class packages

How can I solve this error?

Thanks.

+7
java android android-studio android-gradle build.gradle
source share
2 answers

CommonsWare's answer is correct. The org.json: json: 20090211 dependency is ignored for debugging, as it may conflict with the internal version provided by Android.

If you use a gradle dependency, excluding org.json from the package.

compile ('com.your.dependency.name:0.0.0'){ exclude group: 'org.json', module: 'json' } 

This worked for me.

+9
source share

It would seem that you are trying to use some Java dependency that is not configured for Android. Most likely, this is some kind of dependency that you just added. It could be for org.json:json , or it could be for something else that has a transitive dependency on org.json:json .

If you added a dependency on org.json:json yourself, just use a copy of those classes that are in the Android SDK.

If you added a dependency on something else, and that is what org.json:json requires, talk to the developers of the library you are trying to use and discuss with them how best to use this library on Android.

+3
source share

All Articles