久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Gradle 在新的 Android Studio 2.0 中同步我的項目失敗

Gradle is failing on syncing my project in the new Android Studio 2.0(Gradle 在新的 Android Studio 2.0 中同步我的項目失敗)
本文介紹了Gradle 在新的 Android Studio 2.0 中同步我的項目失敗的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我剛剛將我的 Android Studio 從 1.5 升級(即安裝了全新版本)到 2.0.升級似乎很順利,但是當我打開項目時,當 Gradle 正在同步我的項目時,我遇到了問題.

I have just upgraded (i.e., installed a full new version) my Android Studio from 1.5 to 2.0. The upgrade seemed to go smoothly, but I am having trouble with my project when I open it, when Gradle is syncing my project.

Gradle 同步運行幾分鐘后,我收到此錯誤:

After Gradle sync runs for a couple of minutes I get this error:

Failed to sync Gradle project MyProject
    Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.
    Error:  Enable Gradle "offline mode' and sync project
            Learn about configuring HTTP proxies in Gradle

所以,我點擊下面的鏈接:

So, I click on the link that says:

Enable Gradle "offline mode' and sync project

然后 Gradle 旋轉一兩秒,我現在收到了這樣的信息:

Then Gradle spins for a second or two, and I now have this message:

Failed to sync Gradle project MyProject
    Error: No cached version of com.android.tools.build:gradle:1.3.0 available for offline mode.
           Disable Gradle 'offline mode' and sync project

所以,我點擊這個鏈接:

So, I click on this link:

Disable Gradle 'offline mode' and sync project

我又回到了我的第一個錯誤.

And I am back to my first error again.

我正在使用的機器 100% 離線.它沒有,也永遠不會有任何類型的網絡連接.我想我需要禁用某種需要互聯網的檢查,但我不確定是什么.這是否可以修復,還是我必須降級回 Android Studio 1.5?

The machine I am working on is 100% off line. It does not have, nor will it ever have any kind of network connection whatsoever. I figure I need to disable some kind of check that requires the internet, but I am not sure what. Is this fixable, or do I have to downgrade back to Android Studio 1.5?

更新

我也收到此錯誤消息:

Gradle sync failed: Unknown host 'services.gradle.org'. You may need to adjust the proxy settings in Gradle.

推薦答案

好的,我解決了我的問題,所以我想發布我是如何做到的,以防其他人遇到這種情況.

Ok, I fixed my issue so I wanted to post how I did it in case somebody else runs into this situation.

我在谷歌上四處搜索,發現了一個聲明關于使用 Android Studio 離線工作閱讀:

I was googling around and found a statement regarding working offline with Android Studio that read:

您可以,但是您將無法使用任何 Gradle 依賴項.Gradle 使用 Internet 在存儲庫中搜索依賴項,因此如果您完全無法在線工作.盡量不要在 Gradle 文件中包含任何內容,如果這樣做,您將不得不同步它并且它會失敗.基本上不要碰 Gradle 文件就可以了.

You can, however you won't be able to use any Gradle dependency. Gradle search into the repositories for dependencies using internet, so if you're completely unable to work online. Try not to include anything in the Gradle files, if you do, you'll have to sync it and it'll fail. Bascially just don't touch Gradle files and you'll be good to go.

所以,我查看了我的 gradle 文件,特別是項目的 build.gradle(不是模塊).到了那里,我注意到一行:

So, I looked at my gradle files, specifically the build.gradle for the Project (not for the Module). Once there, I noticed a line:

dependencies {
    classpath 'com.android.tools.build:gradle:1.3.0'
}

所以,我將 1.3.0 替換為 2.0.0 并且項目構建得很好.

So, I replaced 1.3.0 with 2.0.0 and the project built just fine.

我希望這對將來的其他人有所幫助.祝你好運.

I hope this helps somebody else in the future. Good luck.

這篇關于Gradle 在新的 Android Studio 2.0 中同步我的項目失敗的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 国产精品三级 | 亚洲精品第一页 | 91精品国产一区二区三区动漫 | 伦理午夜电影免费观看 | 欧美一区二区三区 | 在线视频一区二区 | 国产xxx在线观看 | 国产激情在线观看视频 | 亚洲欧美视频一区 | 中文字幕一区二区三区在线观看 | 日本成人午夜影院 | 亚洲一区在线日韩在线深爱 | 成人一区二区三区 | 国产成人免费视频网站高清观看视频 | 成人免费淫片aa视频免费 | 久久久久久成人 | 91精品一区二区三区久久久久 | 国产精品久久久久一区二区三区 | 中文字幕日韩一区 | 日韩欧美成人一区二区三区 | 中文字幕免费中文 | 福利视频日韩 | 国产美女福利在线观看 | 欧美天堂 | 国产91久久久久蜜臀青青天草二 | 欧美一区二区三区视频在线 | 国产高清精品一区二区三区 | 日韩精品一区二区三区视频播放 | 久久精品久久精品 | 亚洲网站在线观看 | 亚洲精品丝袜日韩 | 国产视频在线观看一区二区三区 | 亚洲国产精品第一区二区 | 国产一区二区三区在线免费观看 | 一本色道精品久久一区二区三区 | 综合久久亚洲 | 国产美女视频 | 亚洲最大福利网 | 91精品欧美久久久久久久 | 亚洲欧美国产精品久久 | 欧美日韩一 |