如何为Android Studio构建模板项目 [英] How to build template project for Android Studio

查看:342
本文介绍了如何为Android Studio构建模板项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android Studio工作。我必须通过三个模块创建许多项目:


  • 应用程序(应用程序)

  • 库(库)
  • 壁纸(应用程序)



我知道可以使用ADT来构建活动模板等
我发现了一些教程,如这个,但他们讨论活动模板,没有模块的项目



有没有很好的教程可以直接用我需要的结构为Android Studio创建项目模板?



我可以使用哪种IDE来管理模板,如项目(内容助理等)? 解决方案

是的,但可以与构建活动模板无异。



查看文件夹 android-stud IO /插件/ Android的/ lib目录/模板/活动。更具体地说,在 MasterDetailFlow 模板中。您会发现可以在模板中添加任意数量的活动,资源和布局。所以这些模板不会限制你创建整个项目作为模板项目。



在每个文件中,您可以使用 globals.xml.ftl 。


I work with Android Studio. I have to create many projects alway with three modules:

  • app (application)
  • library (library)
  • wallpaper (application)

I know that is possibile to use ADT to build Activity Templates, etc. I found some tutorial like this and this, but they talk about activity template, no project with modules template.

Are there good tutorial around to create Project template for Android Studio directly with the structure i need?

Which IDE can i use to manage template like a project (content assistant, etc)?

解决方案

Yes you can, but it is nothing different than building an Activity Template.

Have a look in the folder android-studio/plugins/android/lib/templates/activities. And more specifically in the MasterDetailFlow template. You see that you can add an arbitrary amount of activities, resources and layouts in your template. So the templates are not limiting you from creating a whole project as a template project.

In each of the files you can use the variables defined in the globals.xml.ftl.

这篇关于如何为Android Studio构建模板项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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