未能建立在离线模式下Android的Hello World应用程序 [英] Failed to build Android Hello World application in offline mode

查看:192
本文介绍了未能建立在离线模式下Android的Hello World应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid的发展。我在没有互联网连接的系统上运行。我已经安装了 的索赔能够支持脱机发展的新Android开发者工作室。我已经下载的zip文件复制到该文件夹​​更新摇篮到1.9(C:\\ Documents和Settings \\ .gradle \\包装\\ dists目录\\ gradle这个-1.9-ALL \\ 3jdgemv0iv8uqohg3kcp2o88r1很显然,开发商工作室没有察觉。这一点,并解压缩的gradle这个文件夹中。

I'm new to Android development. I work on a system that doesn't have an internet connection. I have installed the new Android Developer studio which claims to be supporting offline development. I have updated the Gradle to 1.9 (by copying the downloaded zip file to the folder "C:\Documents and Settings\.gradle\wrapper\dists\gradle-1.9-all\3jdgemv0iv8uqohg3kcp2o88r1". It is clear that the developer studio did detect this and unpacked the gradle in that folder.

这之后,我创建了一个新的HelloWorld项目,并试图构建它,我得到以下错误。

After this I created a new HelloWorld project and tried to build it, I get the following error.

Gradle: A problem occurred configuring project ':app'.

> Could not resolve all dependencies for configuration ':app:classpath'.

   > Could not resolve com.android.tools.build:gradle:0.7.+.
     Required by:
        HellowWorld1:app:unspecified

      > No cached version of com.android.tools.build:gradle:0.7.+ available for offline mode.

你知道是什么原因造成的?我该如何解决这个问题?有没有我应该w.r.t手动安装支架的版本信息?

Do you know what is causing this? How do I solve this? Is there any other file which I should update with the information w.r.t the manually installed Cradle version?

推荐答案

虽然你现在可以构建摇篮项目没有激活的Internet连接,你仍然需要下载的依赖过一次离线模式将工作。如果你没有禁用离线模式一旦建立,你不会有任何依赖你的系统上构建就会失败。

Though you can now build Gradle projects without an active internet connection, you still need to download the dependencies once before offline mode will work. If you don't build once with offline mode disabled, you won't have any of the dependencies on your system and the build will fail.

从Android 0.4.0工作室发布说明:

From the Android Studio 0.4.0 release notes:

请注意,如果你添加一个新的依赖,你仍然需要有一个
  网络连接下载神器。假如你不小心忘了
  你是在离线模式下,对于一个气球提示。

Note that if you add a new dependency you'll still need to have a network connection to download the artifact. If you somehow forget that you are in offline mode, there is a balloon tip for that.

借助构建Android的摇篮插件页面包括手动获取摇篮构建工具的说明。

The Building the Android Gradle Plugin page includes instructions for manually getting the Gradle build tools.

这篇关于未能建立在离线模式下Android的Hello World应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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