我试图在Android Studio中编译导入的Android项目:
com.squareup.okhttp.HttpResponseCache
我收到错误"无法解析符号' HttpResponseCache' "
我尝试在gradle中添加以下依赖项但未成功:
compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.0'
compile 'com.squareup.okhttp:okhttp:2.7.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp3:okhttp:3.1.2'
我应该包含哪些库来使用HttpResponseCache?
答案 0 :(得分:0)
根据documentation,您应该导入android.net.http
。
答案 1 :(得分:0)
在v1之后显然com.squareup.okhttp.HttpResponseCache
为deprecated。我不认为它包含在v2.0.0之后的软件包中
如果您想使用它,请添加:
'com.squareup.okhttp:okhttp:1.6.0'