Anandh
Anandh

Reputation: 159

Error:Failed to resolve: org.json:json:20160810

i just upgraded my android studio to 3.0 canery 1. now am having an issue upon syncing my project which was working fine on my previous version of android studio .

here is my file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.******.app"
        minSdkVersion 14
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.afollestad:bridge:5.1.2'
    compile 'com.vistrav:ask:2.4'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.thefinestartist:finestwebview:1.2.7'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.android.gms:play-services-maps:10.0.1'
    compile 'com.google.android.gms:play-services-places:10.0.1'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

Upvotes: 2

Views: 2278

Answers (2)

Anandh
Anandh

Reputation: 159

exclude org.json its already available in the framework.

 compile('com.afollestad:bridge:5.1.2') {
        exclude group: 'org.json', module: 'json'
    }

Upvotes: 2

AAryan
AAryan

Reputation: 20140

Your project having org.json:json:20160810 artifact(direct injection or indirect(like by provider of other artifact)) but not able to do find from local/remote repo.

And make sure you've your repository in your project

repositories {
    mavenCentral()
    jcenter({url "http://jcenter.bintray.com/"})
}

Hopefully you're connected to Internet so that it can find from remote repo:

You go File > Settings > Gradle Look at the "Offline work" inbox, if it's checked u uncheck and try to sync again.

Upvotes: 0

Related Questions