Gradle 设置无法投射错误 [英] Gradle settings cannot be cast error

查看:25
本文介绍了Gradle 设置无法投射错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

org.jetbrains.plugins.gradle.settings.GradleSettings 在尝试构建新项目时无法转换为 org.jetbrains.plugins.gradle.settings.GradleSettings 错误

org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings error while trying to build new project

我下载了 http://services.gradle.org/distributions/gradle-1.6-bin.zip 手动并将 zip 内容复制到 C:\Program Files (x86)\Android\android-studio\plugins\gradle 文件夹并从 C:\Program Files (x86)\ 复制 gradle.jarAndroid\android-studio\plugins\gradle\lib 到 C:\Program Files (x86)\Android\android-studio\lib 但仍然无法在 android studio 中构建我的第一个项目.

I downloaded http://services.gradle.org/distributions/gradle-1.6-bin.zip manually and copied zip contents to the C:\Program Files (x86)\Android\android-studio\plugins\gradle folder and copied gradle.jar from C:\Program Files (x86)\Android\android-studio\plugins\gradle\lib to C:\Program Files (x86)\Android\android-studio\lib but still unable to build my first project in android studio.

推荐答案

尝试从 这里.然后手动将其内容复制到 C:\Documents and Settings\(Your name)\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\

Try downloading the full zip file from here. Then manually copy it's contents to C:\Documents and Settings\(Your name)\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\

如果这样做有效,请尝试重新安装 Android Studio 并再次执行这些步骤.

If this does work, try to re-install Android Studio and follow these steps again.

如果您运行的是 64 位 Windows 7,请尝试编辑 android-studio\bin\studio.bat

If your running Windows 7 64-bit, try to edit android-studio\bin\studio.bat

SET VM_OPTIONS_FILE=%IDE_BIN_DIR%\studio%BITS%.exe.vmoptions 

to 

**SET VM_OPTIONS_FILE=%IDE_BIN_DIR%\studio%BITS%.exe**

SET JRE=%JDK%
IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
SET BITS=
**IF EXIST "%JRE%\lib\amd64" SET BITS=64**

这篇关于Gradle 设置无法投射错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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