简体   繁体   English

Android Studio的Gradle错误

[英]Gradle Error for Android Studio

I'm trying out Android Studio on OS X and am running into a mysterious error message. 我正在OS X上试用Android Studio,并遇到了一条神秘的错误消息。 I went through the Google guide to building a simple UI , but when I finished writing the XML file and hit Run in the IDE, I get the following message ("Test2" is the name of the project): 我浏览了Google指南以构建一个简单的UI ,但是当我完成编写XML文件并在IDE中单击Run时,我得到以下消息(“ Test2”是项目的名称):

Gradle: Execution failed for task ':Test2:validateDebugSigning'.
> Could not find matching constructor for: org.gradle.tooling.BuildException(java.lang.String)

I have never developed an android app before, so I don't know how common this is. 我以前从未开发过android应用,所以我不知道这是多么普遍。 I did a search for this error and found no one encountering the same problem. 我搜索了此错误,但没有人遇到相同的问题。

I tried the solution from Abhan and I get a new error message: 我尝试了Abhan的解决方案, 收到了新的错误消息:

Error: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings

It warns you that android plug-in task validateDebugSigning cannot access the debug key. 它警告您android插件任务validateDebugSigning无法访问调试键。 Check your accessibility to the debug.keystore. 检查您对debug.keystore的可访问性。

On linux or OS X, the default location is ~/.android. 在Linux或OS X上,默认位置为〜/ .android。 On windows, it's in C:\\Documents and Settings\\.android\\ or C:\\Users\\.android. 在Windows上,它位于C:\\ Documents and Settings \\ .android \\或C:\\ Users \\ .android中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM