如何将IntelliJ android app项目转换为android库项目? [英] How to convert IntelliJ android app project into android library project?

查看:220
本文介绍了如何将IntelliJ android app项目转换为android库项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序项目,包含代码,资源和布局,我想在其他应用程序中提供。

I have an android app project that has code, assets, and layouts, that I'd like to make available in other apps.

应用项目在IntelliJ IDEA中。

The app project is in IntelliJ IDEA.

问题1)如何做我将这个项目转换为一个android库项目?

Question 1) How do I convert this project into an android library project?

问题2)转换后,如何将库项目导入到其他应用程序项目中IntelliJ?

Question 2) After converting, how do I import the library project into other app projects in IntelliJ?

推荐答案

你好Evelyn检查文档:

Hi Evelyn check the docs:

分享Android使用库项目的源代码和资源

Sharing Android Source Code and Resources Using Library Projects

将应用程序模块转换为库模块

您可以通过更新其Android方面将应用程序模块转换为库模块。

You can convert an Application module into a Library module by updating its Android facet.


  1. 打开项目结构对话框,选择文件|主菜单中的项目结构。

  2. 在左窗格中选择模块。在中央窗格中,展开要转换为库模块的模块节点,然后单击Android。

  3. 在右侧窗格中,选中顶部的库模块复选框Android facet页面。

这篇关于如何将IntelliJ android app项目转换为android库项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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