Reputation: 618
I am getting below error while running Android studio.
Warning:Dependency org.json:json:20090211 is ignored for debug as it may be conflicting with the internal version provided by Android.
my build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'org.java-websocket:Java-WebSocket:1.3.0'
compile 'com.github.nkzawa:engine.io-client:0.6.0'
compile 'com.github.nkzawa:socket.io-client:0.6.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile files('libs/json_simple.jar')
compile files('libs/pushy-1.0.7.jar')
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
}
I tried excluding org.json,it is not working.
exclude group:'org.json',module:'json'
but when i remove socket.io-client,engine.io-client and facebook sdk
android studio is running without warnings.
please tell where am i going wrong,
Thank you.
Upvotes: 0
Views: 2579
Reputation: 590
Try this once again. it will definitely work.
You can exclude json dependency from the module by adding the following lines in your build.gradle
I changed from this
compile 'com.github.nkzawa:socket.io-client:0.4.1'
to
compile ('com.github.nkzawa:socket.io-client:0.4.1'){
exclude group: 'org.json', module: 'json'
}
This worked for me : no warning anymore :)
Upvotes: 2