How to convert IntelliJ android app project into android library project?

。_饼干妹妹 提交于 2019-12-10 23:43:46

问题


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

The app project is in IntelliJ IDEA.

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

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


回答1:


Hi Evelyn check the docs:

Sharing Android Source Code and Resources Using Library Projects

Converting an Application module into a Library module

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

  1. Open the Project Structure dialog box by choosing File | Project Structure from the main menu.
  2. Select Modules in the left pane. In the central pane, expand the node of the module that you want to turn into a Library module and click Android.
  3. In the right-hand pane, select the Library module check box on top of the Android facet page.


来源:https://stackoverflow.com/questions/34230015/how-to-convert-intellij-android-app-project-into-android-library-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!