Android的工作室:自动生成像Eclipse [英] Android Studio : auto build like Eclipse

查看:100
本文介绍了Android的工作室:自动生成像Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定使用Eclipse,因为年后使用Android工作室。但我发现关于Android Studio的一个错误的事情对我来说。事实上,这似乎是不可能有自动生成功能,就像在Eclipse中。当文件被修改并保存,我看不到,如果我的项目有错误,警告等。

I decided to use Android Studio after using Eclipse since years. But I found one bad thing about Android Studio for me. Indeed, it seems it's not possible to have the auto build feature like in Eclipse. When files are modified and saved, I can't see if my project has errors, warnings, etc..

那么,有没有办法让这个?

So is there any way to enable this ?

推荐答案

的IntelliJ(Android的一室公寓)都有完全不同的编译系统偏食。它具有渐进式编译是不同的。

IntelliJ (Android Studio) has a whole different build system to eclipse. It has incremental compiling that is different.

的IntelliJ会告诉你,如果事情有一个错误/警告当前打开的文件。

IntelliJ will tell you if something has an error / warning the the CURRENT open file.

所以简单的回答不,你不能。你会看到错误,你打开文件,可以从菜单中选择,这将告诉你这些错误改造项目。您还可以启用自动导入的摇篮,可能会有所帮助。

So short answer no you can't. You will see the errors as you open the files, you can select "rebuild project" from the menu which will show you these errors. You can also enable "auto-import" for Gradle that may help.

您不想做'改造项目的所有时间。因此,我建议你习惯了。

You don't want to be doing 'rebuild project' all the time. So I'd recommend getting used to it.

另外,你不应该依赖于编码的编译错误,你应该放心地重构,它应该是一个惊喜,当一些弹出的一个编译警告,你要修复它。

Also you shouldn't rely on compile errors for coding, you should safely refactor and it should be a surprise when something pop's up a compile warning and you have to fix it.

您应该阅读的IntelliJ常见问题

You should read the IntelliJ FAQ

问:发生了什么事渐进式编译?我怎么编译我   项目?

Q: What happened to incremental compilation? How do I compile my project?

答:它的存在,但工作方式略有其他方式。默认   IntelliJ IDEA的编译文件只在需要时(当您运行   应用程序或explicily调用make动作),所以节省了系统   资源,可以是在目前更重要的其他任务。   编译是递增:IntelliJ IDEA的跟踪   和源文件之间的依赖关系重新编译只有一个文件有   被更改。

A: It's there, but works slightly other way. By default IntelliJ IDEA compiles files only when it's needed (when you run your app or explicily invoke the Make action), and so saves system resources for other tasks that can be more important at the moment. The compilation is incremental: IntelliJ IDEA keeps track of dependencies between source files and recompiles only if a file has been changed.

使用编译错误文件被突出显示,等等都是文件夹   含有它们的 - 这样你就可以轻松地通过项目视图中对它们进行分析。至   看到编译错误的所有文件的列表中,选择范围|   从该视图为项目视图的组合框的问题。在每个   编辑,IntelliJ IDEA的不断执行后台code   分析有错误的文件,并删除红色高亮   自动当您已经解决了他们。

Files with compilation errors are highlighted, and so are the folders containing them — so you can easily analyze them via Project view. To see a list of all files with compilation errors, select Scope | Problems from the View As combobox of the Project view. After each compilation, IntelliJ IDEA constantly performs background code analysis on files with errors, and removes the red highlighting automatically when you've fixed them.

要启用每一个编译文件保存,可以使用EclipseMode   插件: http://plugins.jetbrains.com/plugin/?id=3822 (第三方   发展,而不是捆绑)。

To enable compiling files on every save, you can use the EclipseMode plugin: http://plugins.jetbrains.com/plugin/?id=3822 (third-party development, not bundled).

要能够运行code有错误的,可以选择在Eclipse   编译器在设置对话框中,编译器,Java编译器和添加   -proceedOnError选项附加命令行参数编译器。

To be able to run code with errors, you can select the Eclipse compiler in Settings dialog, Compiler, Java Compiler and add the -proceedOnError option to the Additional command line parameters for the compiler.

<一个href="http://www.jetbrains.com/idea/documentation/migration_faq.html">http://www.jetbrains.com/idea/documentation/migration_faq.html

这篇关于Android的工作室:自动生成像Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆