Android Gradle cannot find symbol class Gson

前端 未结 10 1362
温柔的废话
温柔的废话 2020-12-08 19:07

So i added gson-2.2.4.jar to the libs dir (I\'m using android studio). My project couldn\'t find the gson stuff so I added it as a library dependency to my module in the \"P

10条回答
  •  佛祖请我去吃肉
    2020-12-08 19:14

    Add this on build.gradle (Module: app)

        dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:27.1.1'
          implementation 'com.android.support:design:27.1.1'
          implementation 'com.google.code.gson:gson:2.8.0'
        }
    

提交回复
热议问题