http://www.jetbrains.com/idea/download/
Windows 8
1. 修改环境变量JAVA_HOME
Eclipse需要的环境变量是jre, 但Idea需要设置的JAVA_HOME为jdk,需要在环境变量中将JAVA_HOME修改为 C:\Program Files\Java\jdk1.8.0_25
2 . 导入
双击打开Intelii J, 选择import->选择bundle.gradle,进入界面后gradle会自动下载所需的jar包以及配置环境
3 . 设置gradle
选择File->Settings->Build,Execution,Deployment->Required Plugins->点击添加,选择Gradle->Apply->OK
4 . 设置默认选项
Windows版本安装后会出现这样的问题,双击Intelii J Idea只会打开上次打开的项目,修改这个默认选项请参照下面步骤
Settings->Apprearance & Behavior->System Settings->取消 Reopen last project on startup
5 . 设置Proxy
出现Error:
Unknown host 'services.gradle.org'. You may need to adjust the proxy settings in Gradle
解决方法:
File> Settings > Appearance & Behavior > System Settings > HTTPProxy Enable following option Auto-detect proxy settings
添加上proxy可能还是会报错,为毛
因为有些包是https下载的,不设置proxy还是下载不了,于是要在gradle.properties中设置
以下为gradle.properties内容
webappPath=D:\\Software\\apache-tomcat-7.0.53\\webapps
systemProp.http.proxyHost=proxy.pccw.com
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=proxy.pccw.com
systemProp.https.proxyPort=8080
放在C盘 ../Users/./gradle文件夹下
6 . 开启Error提示
Settings->Build,Execution,Deployment->Compiler->Build project automatically (only works while not running/debugging) 打开
7 . 一些gradle包下载失败等处理
实际上是gradle的设置问题
在Settings->Build,Execution,Deployment->Gradle-> 一下选项打钩
Use auto-import; Create separate module per source set; Use default gradle wrapeer (recommened)
注意 Offline work一定不能打钩,如果打钩则下载依赖包失败也不会提示
以上