【问题标题】:Error:Failed to find: com.google.code.gson:gson:2.3错误:找不到:com.google.code.gson:gson:2.3
【发布时间】:2015-02-05 14:05:52
【问题描述】:

我正在尝试将 Gson 库添加到我的 gradle 中,但找不到该库。我已经尝试了几乎所有版本,但没有任何效果。

我的依赖项如下:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'

    // Volley
    compile 'com.mcxiaoke.volley:library:1.0.6@aar'

    // Gson
    compile 'com.google.code.gson:gson:2.3'

}

有什么解决办法吗?

【问题讨论】:

  • 你清理过项目吗?因为我有类似的问题。
  • 我已经打扫过了
  • 是的,就像 EugenPechanec 说的离线工作应该被取消选中。
  • 是,但未离线检查

标签: android gradle gson


【解决方案1】:

试试这个并同步项目并确保已连接互联网。

compile 'com.google.code.gson:gson:2.3.1'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-28
    相关资源
    最近更新 更多