gpt4 book ai didi

安卓工作室 : auto build like Eclipse

转载 作者:IT王子 更新时间:2023-10-28 23:52:54 26 4
gpt4 key购买 nike

在使用 Eclipse 多年后,我决定使用 Android Studio。但我发现 Android Studio 对我来说是一件坏事。事实上,似乎不可能像 Eclipse 那样拥有自动构建功能。文件修改保存时,看不到我的项目是否有错误、警告等。

那么有什么办法可以启用吗?

最佳答案

IntelliJ (Android Studio) 具有与 eclipse 完全不同的构建系统。它具有不同的增量编译。

IntelliJ 会告诉您当前打开的文件是否有错误/警告。

如此简短的回答,不,你不能。打开文件时您会看到错误,您可以从菜单中选择“重建项目”,它将显示这些错误。您还可以为 Gradle 启用“自动导入”,这可能会有所帮助。

您不想一直在做“重建项目”。所以我建议习惯它。

此外,您不应该依赖编译错误进行编码,您应该安全地重构,当某些东西弹出编译警告并且您必须修复它时,这应该是一个惊喜。


您应该阅读 IntelliJ 常见问题解答

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

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

Files with compilation errors are highlighted, and so are the folderscontaining them — so you can easily analyze them via Project view. Tosee a list of all files with compilation errors, select Scope |Problems from the View As combobox of the Project view. After eachcompilation, IntelliJ IDEA constantly performs background codeanalysis on files with errors, and removes the red highlightingautomatically when you've fixed them.

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

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

http://www.jetbrains.com/idea/documentation/migration_faq.html

关于安卓工作室 : auto build like Eclipse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20480822/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com