Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
911 views
in Technique[技术] by (71.8m points)

apply plugin: 'android' or apply plugin: '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' .

What are the differenceres? Which one should be used ?

question from:https://stackoverflow.com/questions/27342458/apply-plugin-android-or-apply-plugin-com-android-application

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

Click here for detailed explanation -


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...