工欲善其事,必先利其器。

  来分享下一些tips吧。


android studio优化


 我的习惯是从visual studio沿袭过来的,所以快捷键都是参照VS改过来的.

 

 设置调优

不打开上次打开的工程

在setting里面搜索Reopen里面有Reopen last project on startup,不勾就行了

 ctrl+鼠标滚轮缩放代码(搜索Mouse Wheel ,勾上即可)

Click on File -> Settings -> Editor and check the field: Change font-size with CRTL + Mouse Wheel 

auto import

在editor-general-里的auto import项中,java节点里面全部勾上.insert import on paste这个设置就见仁见智了,我喜欢编辑器自动加上去.

 取消智能感应大小写敏感

Case sensitive completion选择none即可.code completion里面其他设置也蛮不错的,比如auto popup documenttion,和弹出参数的时间,这个调低了一点.

鼠标移动显示文档

我非常喜欢这个设置,因为适合新手,搜索show quick doc on mouse move ,勾选自己设置delay.

方法的快速注释

/**然后回车即可

live template

这个要重点关注!现在版本的Android studio,已经可以直接在写代码的时候候选里面有live template. 不过每一个代码片段要注意作用域(java/c++/html/...)的设置(默认无作用域)

否则会出现不出现的情况

其他好用的键 

next highlighted error
pin active tabs 
 

皮肤的更改

这个很好玩,我把代码着色改成visual studio的.相关的设置可以参考我第三个链接
其他皮肤可以可以在http://color-themes.com 里面找
 
File -> import settings -> and select the Monokai-Sublime.jar
File -> Settings and search for “Theme”, select “Darcula”
 

AVD

 

屏幕方向不对

A:建立AVD的时候在 "Edit Android Virtual Device (AVD)"里面"Hardware keyboard present"不要勾选上.这个是AVD的bug.目前只能这么解决


告别呆逼虚拟机

A:1安装intel镜像;2安装haxm;3编辑AVD.正确的结果是运行设备时,提示:HAX is working and emulator runs in fast virt mode

 

启动AVD错误

Emulator] emulator: ERROR: Unable to load Vm from snapshot. The snapshot has been saved for a different hardware configuration.

A:删除该AVD的snapshots.img文件或者禁用snapshot

 

参考链接:

http://www.cnblogs.com/beginor/archive/2013/01/13/2858228.html

 https://software.intel.com/en-us/blogs/2014/10/20/how-to-ensure-you-are-using-intel-haxm-for-android-emulator

How to get the Monokai Color theme in Android Studio (and IntelliJ)

color-themes.com

 

posted on 2015-03-23 20:18  Cherbim  阅读(268)  评论(0编辑  收藏  举报

这是页脚