AS开发中设置

来源:互联网 发布:fopen提高权限 linux 编辑:程序博客网 时间:2024/06/05 02:04

转载---http://blog.csdn.net/miyuehu/article/details/44154963


使用自己的名字当Tag。却发现有个非常不用好的提示。波浪,我浪个你妹。


Typo:In word ‘miyuehu’ less...(Ctrl+F1)

spellchecker inspection helps locate typos and misspelled in your code,comments and literals, and fix them in one click.

我尼玛,不能接受。赶紧度娘,找解决办法。。。

File----Settings
































把Spelling typo勾选去掉(禁用单词拼写检查)


点击 apply 关掉窗口。在看看,波浪提示果然消失了。哈哈~~~



高兴之余。默默。。。看了下這句话的翻译。。。

spellchecker inspection helps locate typos and misspelled in your code,comments and literals, and fix them in one click.

机器翻译出来就是:

拼写检查器检查可以帮助查找拼写错误拼写错误代码、 注释文本 修复它们一次点击


這一看,這个功能挺好的啊!!!每个东西,都有它存在的价值。。。思考。。。动手。。。


耶,有发现啊!!!选中单词,单击鼠标右键,卧槽。







Change to...就不用了。

Save ‘miyuehu’ to dictionary...不就是保存到词典的意思嚒。。。果断点了。在看看,波浪消失了。


至此,波浪终于被解决了,或许這个才是解决办法吧。




Android Studio的一些配置(去拼写检查、自动import、大小写智能提示等)

偶尔使用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,然后保存即可。




原创粉丝点击