Android Gradle cannot find symbol class Gson

前端 未结 10 1365
温柔的废话
温柔的废话 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:29

    Just to add a point,

    As of Gradle 1.7, jcenter() is a superset of mavenCentral()...so no need of adding and repositories directive.

    Jars will be downloaded from online central jcenter repository. so adding just the following statement is working.

    dependencies {
    compile 'com.google.code.gson:gson:2.2.+'
    }
    

提交回复
热议问题