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

安稳与你 提交于 2019-12-19 05:43:40

问题


While I am running android studio, the warning below appears:

Dependency org.json:json:20090211 is ignored for debug as it may be conflicting with the internal version provided by Android. In case of problem, please repackage with jarjar to change the class packages

How can I resolve this error?

Thank you.


回答1:


CommonsWare answer is correct. Dependency org.json:json:20090211 is ignored for debug as it may be conflicting with the internal version provided by Android.

If you are using gradle dependency try excluding org.json from the package.

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

This one worked for me.




回答2:


It would appear to be that you are trying to use some Java dependency that is not set up for Android. Most likely, it is whatever dependency you just added. That 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 the dependency on org.json:json yourself, just use the copy of those classes that are in the Android SDK.

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



来源:https://stackoverflow.com/questions/32921328/dependency-org-jsonjson20090211-is-ignored-for-debug-as-it-may-be-conflicting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!