想使用的GsonFactory
類在我的應用程序:無法解析進口com.google.api.client.json.gson.GsonFactory
StudentApi.Builder builder = new StudentApi.Builder(AndroidHttp.newCompatibleTransport(), new GsonFactory(), null);
但它說cannot resolve symbol 'GsonFactory'
我在進口我班
import com.google.api.client.json.gson.GsonFactory;
但gson
不能得到解決,所以我嘗試Alt-Enter - Find jar on web
但庫找不到。
我有這個在我的build.gradle
依賴關係:
dependencies {
...
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.api-client:google-api-client-android:1.19.0'
}
我可以證實,這個類不exist。
您也可以如果可能的話用JacksonFactory。 http://stackoverflow.com/questions/17231722/com-google-api-client-json-jackson-jacksonfactory-missing-in-google-drive-examp – user2872177