socketio / engine.io-client-java

Engine.IO Client Library for Java
http://socketio.github.io/engine.io-client-java
Other
359 stars 167 forks source link

WARNING: Dependency org.json:json:20090211 is ignored for debug #13

Closed JTallis closed 8 years ago

JTallis commented 9 years ago

I recently found this repository and so I added the compile statement to my build.gradle and it creates these warnings on debug:

WARNING: 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 WARNING: Dependency org.json:json:20090211 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'm running android 4.4.4 on my device.

nkzawa commented 9 years ago

Yeah, I know that but we can't remove the dependency since this library is not only for Android. Anyway I believe there is no problem with functionality though it's annoying. Do you know a good way to suppress these warnings?

JTallis commented 9 years ago

I don't know a way to suppress the warnings however would it be possible to check if the OS being ran is android and to do something else?

mdellerie commented 9 years ago

You can exclude json dependency from the module by adding the following lines in your build.gradle :

compile ('com.github.nkzawa:socket.io-client:0.4.1'){ exclude group: 'org.json', module: 'json' }

This worked for me : no warning anymore :)

heinhtetaung92 commented 9 years ago

Thanks mdellerie, That works for me too. Thanks for answer. :)

mdellerie commented 9 years ago

You're welcome! ;-)

alemures commented 9 years ago

I was getting those annoying warnings as well and it solved my problem, thanks @mdellerie !

mdellerie commented 9 years ago

my pleasure ! ;)

akamadya commented 9 years ago

wow, thank's

binhtvt commented 9 years ago

Thank you @mdellerie :+1:

nkzawa commented 8 years ago

Added to README. Thanks, @mdellerie !

MikeSoft commented 7 years ago

thanks @mdellerie

Chheata commented 7 years ago

@mdellerie I use this compile 'org.json:json:20151123'

and after I add this compile 'com.github.nkzawa:socket.io-client:0.3.0'{ exclude group: 'org.json', module: 'json' }

it still not work 😢😥

vishaljadav24 commented 7 years ago

@Chheata Use this: compile ('com.github.nkzawa:socket.io-client:0.4.1'){ exclude group: 'org.json', module: 'json' }

It's works for me. Thanks @mdellerie

MuhammadjonTohirov commented 7 years ago

try to use this library. compile 'org.json:org.json:chargebee-1.0'

ladykat commented 7 years ago

Hi guys! I tried to use this: compile ('com.github.nkzawa:socket.io-client:0.4.1'){ exclude group: 'org.json', module: 'json' }

But doesn't work too!

Error message as follows, help please? Error:Could not find method compile() for arguments [com.github.nkzawa:socket.io-client:0.4.1, build_cunlaeueny2t2ajmdz9zk0q17$_run_closure7@31411f8f] on project ':android' of type org.gradle.api.Project.

DanChab commented 7 years ago

Many thanks, worked for me too

serrokitskiy commented 7 years ago

@ladykat You must add comma))) replace compile 'com.github.nkzawa:socket.io-client:0.4.1' { exclude group: 'org.json', module: 'json' } to compile 'com.github.nkzawa:socket.io-client:0.4.1', { exclude group: 'org.json', module: 'json' }

wajdan846 commented 7 years ago

great thanks mdellerie

silentcontrol00 commented 7 years ago

@serrokitskiy Hay Bro,thank alot for your answer. it work for me Bro.

ghost commented 6 years ago

Warning:WARNING: Dependency org.json:json:20140107 is ignored for withAnalyticsDebug as it may be conflicting with the internal version provided by Android. how to solve this ???????????

RishabhS05 commented 6 years ago

thanks .... : )

Masoud2159 commented 6 years ago

Hi! I tried to use this: dependencies { classpath 'com.android.tools.build:gradle:3.0.0' compile 'com.github.nkzawa:socket.io-client:0.4.1', { exclude group: 'org.json', module: 'json' }

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

But doesn't work!

Error message as follows, help, please?

Could not find method compile() for arguments [com.github.nkzawa:socket.io-client:0.4.1, build_7vmonel3c4y8lhnndnc10z8wh$_run_closure1$_closure3$_closure4@388f4cb] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.