Android Studio 导入gson can't find

2018-08-14  本文已影响0人  全球顶尖伪极客

前言:

导入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

上一篇 下一篇

猜你喜欢

热点阅读