Android Studio 导入gson can't find cached 'library'

前言:

导入Google中的解析json库gson报错找不到的情况,解决方案

Unable to resolve dependency for ':app@debug/compileClasspath': Could not download gson.jar (com.google.code.gson:gson:2.8.2)

gradle.properties中加入:

-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1080

or

systemProp.socks.proxyHost= #your host
systemProp.socks.proxyPort= #your port

或许可以在project下的gradle.build加上jcenter()
这篇文章可以试试

Android 添加依赖failed to resolve xxxx库

或者:
参考链接:https://stackoverflow.com/questions/38204094/android-studio-could-not-resolve-com-google-code-gsongson2-7

你可能感兴趣的:(Android Studio 导入gson can't find cached 'library')