难道Android的工作室需要互联网连接来构建项目 [英] Does Android studio need internet connection to build project

查看:218
本文介绍了难道Android的工作室需要互联网连接来构建项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Android Studio版本0.4.2的gradle和1.9版本。我已成功安装Studio和创建多个项目。今天,当我发起工作室的没有互联网连接

I am using Android studio version 0.4.2 and gradle version 1.9. I have successfully installed Studio and have created multiple projects. Today when I launched Studio without internet connection,

我得到这个错误信息:

摇篮工程同步失败。基本的功能(例如编辑,
  调试)将无法正常工作,并在事件日志窗口显示
  无法刷新摇篮工程<项目名称>连接超时。
  出:连接。如果你是后面的HTTP代理服务器,请配置
  代理设置,无论是在IDE或摇篮。

"Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly" and the Event Log window shows "Failed to refresh Gradle project < Project Name >. Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle."

我需要知道,如果互联网连接是强制性的使用gradle这个建设项目。

I need to know if internet connection is mandatory for building projects using gradle.

我觉得对于互联网上的最新版本gradle这个检查,并抛出连接超时错误。如果是这样,有没有解决方法禁用。

I think gradle checks for latest version on internet and throws Connection time out error. If so, is there any workaround to disable that.

推荐答案

目前的Andr​​oid Studio的摇篮实施要求快速稳定的网络连接。无论出于何种原因,开发商决定给力,此时的用户此要求。有你应该能够使用利用一个本地的gradle安装的设置,但它不成立。该开发者了解这两种网络的要求和破碎的开关,但目前优先考虑的其他功能。他们的可能的删除要求在1.0或1.0发布的时间框架。

Currently Android Studio's Gradle implementation requires a fast stable network connection. For whatever reason, the developers have decided to force this requirement on users at this time. There is a setting that you should be able to use to utilize a local gradle installation, but it doesn't hold. The developers know about both the network requirement and the broken switch, but are currently prioritizing other functionality. They may remove that requirement in the 1.0 or post 1.0 time frame.

[参见:<一href=\"https://plus.google.com/u/0/115692564989237473252/posts/LGSbniYqj3Q\">https://plus.google.com/u/0/115692564989237473252/posts/LGSbniYqj3Q ]

摇篮的离线模式,是不是。应该正确命名的缓存的模式。所有这些开关的作用是告诉gradle这个不要尝试去上网,而是利用各种网络资源的缓存副本。不幸的是假定你有过(并且将再次有)的网络连接,preferably一个快速稳定的。采用Android工作室(最后一个版本测试0.5.9)在观看的Andr​​oid Studio流程摇篮(和Maven)过程通常2-5分钟,有时10分钟或更慢/网络不稳定的结果。此外,在看似随机时间编码时,IDE会锁定并病因通常包括已经剥离了一个或多个摇篮流程。

Gradle's offline mode, isn't. It should be properly named cached mode. All that switch does is tell gradle to not try to go online and instead utilize cached copies of the various networked resources. Unfortunately that assumes that you have had (and will have again) a network connection, preferably a fast stable one. Using Android Studio (last version tested 0.5.9) with a slow/unstable network results in watching Android Studio process Gradle ( and Maven ) processes usually for 2-5 minutes, sometimes for 10 minutes or more. Also at seemingly random times when coding the IDE will lock up and the cause usually involves one or more Gradle processes that have spun up.

作为对比,使用的IntelliJ IDEA 13.1社区版(即Android的工作室是基于IDE)我比较了默认的Hello Android的使用Android摇篮向导(基本上类似于Android Studio中唯一的一个),IDE生成的程序和Ant基于Android向导。被预期的结果。该基于gradle这个项目经历了同样的痛苦锁和滞后,在Android的Studio项目展出。蚂蚁基于Android项目已接近瞬间。没有AP preciable延迟,一旦该项目被创建并打开。编码没有造成人员随机锁定。测试是在Windows 8.1 UPDATE1临机上完成了一个双速龙X2处理器,6GB内存,以及6MB / 0.75Mb DSL连接。我相信,最后一部分是最有可能的问题。

As a comparison, using IntelliJ IDEA 13.1 Community edition (the IDE that Android Studio is based on) I compared a default "Hello Android" IDE generated program using the Android Gradle wizard (substantially similar to the only one in Android Studio) and the Ant based Android wizard. The results were as expected. The gradle based project experienced the same painful lock up and lag that projects in Android Studio exhibited. The ant based Android project was near instantaneous. No appreciable delay once the project was created and opened. Coding caused no random lockups. Testing was done on a Windows 8.1 update1 Pro machine with a dual Athlon x2 processor, 6GB RAM, and a 6Mb/0.75Mb DSL connection. I believe that last part is most likely the issue.

不幸的是,直到Android Studio中删除了网络的要求,我觉得这将是无法使用到大量的开发人员。这是一个耻辱,因为否则它看起来是在现有的基于Eclipse的开发环境显着改善。

Unfortunately until Android Studio removes the network requirement I feel it will be unusable to a large number of developers. That's a shame because otherwise it looks to be a marked improvement over the existing Eclipse based development environment.

这篇关于难道Android的工作室需要互联网连接来构建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆