偶尔使用Android Studio写App,由于习惯了ADT的一些配置,如大小写均智能提示等,因此在AS中感觉非常不习惯,不过不用担心,AS也可以做上述配置,满足你的要求。

1.去拼写检查

AS默认会对代码做拼写检查,如果检查有错的话会打上波浪线,当然这并不影响编译运行,但如果对代码有高度的整洁规范要求,则似乎不可容忍,具体做如下配置,可以关闭AS的拼写检查。


File-->Settings,在左侧面板选择Editor-->Inspections,右侧找到Spelling选项,将其后面复选框的对勾去掉,然后保存即可。

2.自动import

在AS中可以通过Alt+Enter逐个导入import,但这样效率太低了,做如下配置,AS就可以为我们导入所有确定的import,如下图:


File-->Settings,在左侧面板选择General-->Auto Import,右侧选中Add unambiguous imports on the fly,然后保存即可。

3.输入大小写都能够智能提示

在AS中默认的智能提示是区分大小写的,一般的coding模式是小写,但类名基本是大写,如果在输入时切换大小写则会大大影响编码效率,因此需要让AS无论大小写都支持智能提示,具体配置如下图:


File-->Settings,在左侧面板选择General-->Code Completion,右侧将Case sensitive completion设置为None,然后保存即可。

4.Gradle构建时发生空间不够的情况

具体报错如下:

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/2.2.1/userguide/gradle_daemon.html
Please read the following 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.

解决方案配置如下:


File-->Settings,在左侧面板选择Build,EXecution,Deployment-->Gradle,右侧将Gradle VM options设置为-Xmx512m,然后保存即可。


更多相关文章

  1. 蚊子132 需要了解Android(安卓)SDK支持的配置标识符
  2. Kotlin学习之路(1)环境介绍及安装
  3. Android(安卓)APN的设置问题--进一步讨论
  4. Android(安卓)studio下Cmake配置编译开发jni总结
  5. Android(安卓)源码通过makefile配置文件对系统APP进行代码混淆
  6. Android入门进阶教程(3)-linux 开发环境的搭建
  7. (8)Android之路====Android新增自定义项目配置
  8. HTC HERO/Android(安卓)刷机+中文配置
  9. Ubuntu 12.04 编译Android(安卓)4.0.3 的环境配置

随机推荐

  1. Android引导界面设计之ParallaxViewPager
  2. Android、iOS添加子视图方法比较
  3. Android开发板串口(SerialPort)通信
  4. Android屏幕自适应
  5. 中国开始与Android较劲
  6. Android消息机制之Handler
  7. 浅谈iOS和Android系统版本的迭代
  8. Android物联网开发从入门到实战
  9. Umeng推送消息的坑,Android Service的andr
  10. 你到底懂Android吗?了解多少?