android studio首個項目碰到的一些問題

來源:互聯網
上載者:User

標籤: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首個項目碰到的一些問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.