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

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

问题描述

我使用 Android Studio.我必须始终使用三个模块创建许多项目:

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

  • 应用程序(应用程序)
  • 图书馆(图书馆)
  • 壁纸(应用程序)

我知道可以使用 ADT 来构建活动模板等.我找到了一些教程,例如 thisthis,但他们谈论的是活动模板,没有带有模块模板的项目.

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.

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

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

我可以使用哪个 IDE 来管理项目(内容助手等)等模板?

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.

查看文件夹 android-studio/plugins/android/lib/templates/activities.更具体地说,在 MasterDetailFlow 模板中.您会看到您可以在模板中添加任意数量的活动、资源和布局.因此模板并不限制您将整个项目创建为模板项目.

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.

在每个文件中,您都可以使用 globals.xml.ftl 中定义的变量.

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

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

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