我收到此錯誤信息,如果我嘗試使用GsonConvertFactory:無法解析符號GsonConverterFactory
無法解析符號
GsonConverterFactory
我使用它是這樣的:
return new Retrofit.Builder()
.baseUrl(BASE_URL)
.client(client)
//.addConverterFactory(MoshiConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create(gson))
.build();
這是我的gradle這個文件(模塊:APP):
dependencies {
...
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
compile 'com.google.code.gson:gson:2.7'
}