Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress Gradle Warning in Android Studio?

I get the following warning in Android Studio:

Warning:Dependency org.json:json:20140107 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 cannot remove the dependency because I use it in a dependent project.

How can I suppress the above Gradle Warning in Android Studio?

like image 357
confile Avatar asked Jun 09 '15 15:06

confile


People also ask

How do I stop a lint warning?

In recent versions of lint, you can also use a special line comment on the line above the error to suppress a warning. In . java and . gradle files, use a comment line this (where again the issue id can be a comma separated list of id's).

What is lintOptions?

lintOptions { abortOnError false } This means it will run lint checks but won't abort the build if any lint error found. By default, its true and stops the build if errors are found.


1 Answers

This should be sufficient enough for all of your needs:

compile ('some:project:or:library'){
    exclude group: 'org.json', module: 'json'
}
like image 184
scana Avatar answered Oct 14 '22 16:10

scana