【问题标题】:Gradle sync failed. Fixed coding but keeps failing buildGradle 同步失败。修复了编码,但构建失败
【发布时间】:2021-07-24 23:01:29
【问题描述】:

【问题讨论】:

    标签: android-studio gradle gson repository


    【解决方案1】:

    您可能知道com.google.code.gson:gson 是一个依赖项,应在您声明它的build.gradle 文件notdependencies 部分中声明。您还应该考虑使用implementation 而不是compile,因为它已经被弃用了一段时间:

    apply plugin: 'com.android.application'
    ...
    dependencies {
        implementation 'com.google.code.gson:gson:2.8.7'
    }
    

    【讨论】:

      猜你喜欢
      • 2016-12-29
      • 1970-01-01
      • 1970-01-01
      • 2016-02-04
      • 1970-01-01
      • 1970-01-01
      • 2020-01-14
      • 2015-08-22
      • 2014-03-30
      相关资源
      最近更新 更多