Reputation: 360
So I am trying to build a Project using JSON. So as explained here, I included the Java file as dependency in my build.gradle. Importing the Json package, I still can't use the JSONParser. While syncing my Project (after including json lib), I am getting two warnings:
Warning:Dependency org.json:json:20141113 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
Warning:Dependency org.json:json:20141113 is ignored for release 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
I just don't know how to handle those warnings.
Upvotes: 1
Views: 4925
Reputation: 186
The preferred solution to your problem is to include the library as a dependency in your build.cradle file.
In the dependency section add the line.
compile 'org.json:json:20141113'
Re-sync your gradle file, and the library will be fetched from the maven repository.
Hope this resolves your issue.
Upvotes: 3