android - 错误 :Failed to resolve: org. json:json:20160810

标签 android gradle

我刚刚将我的 android studio 升级到 3.0 canery 1。现在在同步我的项目时遇到问题,该项目在我以前版本的 android studio 上运行良好。

这是我的文件

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'

最佳答案

排除框架中已经可用的org.json。

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

关于android - 错误 :Failed to resolve: org. json:json:20160810,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44082015/

相关文章:

java - Libgdx Gwt 使用补间引擎编译错误

gradle - Gradle无法编译。库寻找不相关的可绘制对象

java - 如何将自定义证书添加到 Jenkins 内部 JDK?

android - "No Activity found to handle Intent"在浏览器中加载 URL 时发生错误

Android Studio - 公司域名

android - ICS 拆分调用/通知音量

Android Studio 2.2 原生开发迁移问题

android - 约束布局 : how to center a view under another and also stay within parent bounds?

android - ?安卓 :attr/selectableItemBackground

android - 升级到1.4后,Android Studio Gradle错误-错误:原因:https://downloads.gradle.org/distributions/gradle-2.2.1_all.zip