標籤:http代理 .com http 解決 content mirrors find detail yun
一開始,我用的是android studio3.1,碰到Get “.gradle”的問題。解決方案是https://www.zhihu.com/question/37810416。在project中的build.gradle添加
maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/‘ }
maven{ url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘}
在配置http代理的時候,我使用了 大連東軟資訊學院鏡像伺服器地址:
- http://mirrors.neusoft.edu.cn 連接埠:80
由於接下來還是碰到問題,我改成了android studio2.3. 首先碰到了
Gradle sync failed: Could not find method android() for arguments [[email protected]] on root project ‘FirstApplication‘ of type org.gradle.api.Project.
Consult IDE log for more details (Help | Show Log)
解決方案是刪除了project中的build.gradle中的
android{
}
dependencies{
}
理由是app中的build.gradle已經有這兩個內容了。參考:stackoverflow中的問題。
第二個碰到:failed to resolve: junit:junit:4.12, 還有一個類似的。
解決方案是:https://stackoverflow.com/questions/36992657/failed-to-resolve-junitjunit12.
具體原因我也不理解。
至此編譯完成。
android studio首個項目碰到的一些問題