更新Android的工作室后,摇篮生成错误 [英] Gradle build errors after updating Android Studio
问题描述
我刚刚更新的Android工作室,现在当我尝试建立我的应用程序,我碰到下面的摇篮错误:
信息:编制完成了2个错误和0警告,28秒 信息:2个错误 信息:0警告 错误:摇篮:显示java.lang.NullPointerException /Users/mhuggins/Sites/SmoothieFlow/build.gradle 错误:(9,0)摇篮:发生评估根工程SmoothieFlow的问题。 >该SDK目录'/用户/ mhuggins /图书馆/缓存/ AndroidStudio preVIEW /编译服务器//应用/ Android的Studio.app / SDK不存在。
关于Android Studio的版本的详细信息:
Android的工作室(I / O preVIEW)AI-130.709792
构建#AI-130.709792,建于2013年6月14日
JDK 1.6.0_43
VM:Java的热点(TM)64位服务器虚拟机由苹果公司
。
有谁知道为什么我得到这一点,我能做些什么来解决这个问题?
尝试添加一个新的文件在你的项目中称为根local.properties(或修改现有的一个)。它应该包含
sdk.dir =
其次是路径SDK位置,在我的情况
sdk.dir = /应用/ Android的Studio.app / SDK
我认为Android工作室通常会自动创建一个,但表示,它不应该被添加到VCS。我把它放在我的.gitignore和克隆我的Mac上的项目,这导致了这个错误。奇怪的是0.1.5之前,它的工作就好了,而不该文件。
I just updated Android Studio, and now when I try to build my app, I get the following Gradle error:
Information: Compilation completed with 2 errors and 0 warnings in 28 sec Information: 2 errors Information: 0 warnings Error: Gradle: : java.lang.NullPointerException /Users/mhuggins/Sites/SmoothieFlow/build.gradle Error:(9, 0) Gradle: A problem occurred evaluating root project 'SmoothieFlow'. > The SDK directory '/Users/mhuggins/Library/Caches/AndroidStudioPreview/compile-server/"/Applications/Android Studio.app/sdk"' does not exist.
Details about Android Studio version:
Android Studio (I/O Preview) AI-130.709792
Build #AI-130.709792, built on June 14, 2013
JDK 1.6.0_43
VM: Java HotSpot(TM) 64-Bit Server VM by Apple Inc.
Does anyone know why I'm getting this and what I can do to fix it?
Try adding a new file in the root of your project called "local.properties" (or modify the existing one). It should contain
sdk.dir=
followed by the path to the sdk location, in my case
sdk.dir=/Applications/Android Studio.app/sdk
I think Android Studio normally creates one automatically but says that it shouldn't be added to VCS. I put it in my .gitignore and cloned the project on my Mac which resulted in this error. Strangely before 0.1.5 it worked just fine without the file.
这篇关于更新Android的工作室后,摇篮生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!