android studio make build区别,Difference between make and build in Android Studio

问题

The Android Studio Build menu has options including

Make Project

Rebuild Project

When should I use each?

回答1:

Most of the time you should use Make Project. Sometimes, after adding libraries and making big changes to the project you should use Rebuild Project.

If you look at the menu, you'll see that Make Project and Compile have keyboard shortcuts, that suggests that they are often used. Others are seldom used.

It is the same as IntelliJ Idea.

Compile All the source files in the specified scope are compiled. The scope in this case may be a file, a package, etc.

Make Project All the source files in the entire project that have been modified since the last compilation are compiled. Dependent source files, if appropriate, are also compiled. Additionally, the tasks tied to the compilation or make process on modified sources are performed. For example, EJB validation is performed if the corresponding option is enabled on the Validation page.

Make Module Compiled are all the source files that have been modified since the last compilation in the selected module as well as in all the modules it depends on recursively.

Rebuild Project All the source files in the project are recompiled. This may be necessary when the classpath entries have changed, for example, SDKs or libraries being used added, removed or altered

Copied from IntelliJ Idea 13 help.

回答2:

The difference is that Rebuild executes gradle's clean task first. If you look in the Gradle Console 'Rebuild Project' will say something like

Executing tasks: [clean, :app:compileDebugSources, :app:compileDebugAndroidTestSources]

While 'Make Project' won't have clean

Executing tasks: [:app:compileDebugSources, :app:compileDebugAndroidTestSources]

回答3:

Difference between make and rebuild is "clean" task.

When you do rebuild project it performs clean too.

来源:https://stackoverflow.com/questions/20375863/difference-between-make-and-build-in-android-studio

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值