应用插件:'机器人'或应用插件:“com.android.application” [英] apply plugin: 'android' or apply plugin: 'com.android.application'
问题描述
作为主题。 摇篮
要求建立插件
,有它提到应用插件时间: 机器人
,和其他以应用插件:com.android.application
。
As in topic. Gradle
require to set up plugin
and there are times that it is mentioned to apply plugin: 'android'
, and other to apply plugin: 'com.android.application'
.
什么是differenceres?哪一个应该被使用?
What are the differenceres? Which one should be used ?
推荐答案
应用插件:'机器人'
规定,这是一个Android项目,但并没有规定它的一个应用或库项目。为了使生活更轻松,你可以告诉摇篮项目的类型,并指出应该使用哪个插件。我推荐使用应用插件:com.android.application
如果项目是一个应用程序,并应用插件:com.android.library
如果项目是一个lib。它有助于摇篮有效地编制项目。
apply plugin: 'android'
specifies that It's an Android project but it does not specify Its an Application or Library project. To make life easier you can tell gradle the type of project and indicate which plugin should be used. I recommend to use apply plugin: 'com.android.application
if project is an app and apply plugin: 'com.android.library'
if project is a lib. It helps gradle to compile project efficiently.
点击此处详细的解释 -
这篇关于应用插件:'机器人'或应用插件:“com.android.application”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!