原文地址:http://blog.csdn.net/lovelyelfpop/article/details/46786433
一、安装完初次打开Android Studio,进度条一直在转(Fetching Android SDK component information),如下图
解决办法:
1、打开Android Studio的安装目录下的bin目录
2、记事本(或者其他文本工具,推荐NotePad++)打开idea.properties文件
3、在最后一行添加“disable.android.first.run=true”,如下图:
4、重启Android Studio,就不会去获取Android SDK component information了
二、引入project后不能Gradle,build出错
下面是错误日志:
Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html Please read below process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
应该是分配内存不足。
解决办法:
1 定位到目录 C:\Users\<username>\.gradle
2 创建文件gradle.properties,内容如下:
org.gradle.jvmargs=-Xmx512m
3 重启你的Android Studio项目,搞定。
-------------------------------------------------------------------------------------------------------------
如果没有做上面(第二个问题)的配置,cordova 4+ 在build的时候也是会出错的,错误内容和上面的日志一样,如下图:
欢迎加入Sencha Touch + Phonegap交流群
1群:194182999 (满)
2群:419834979
共同学习交流(博主QQ:479858761)