问题
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.
- Open the Project Structure dialog box by choosing File | Project Structure from the main menu.
- 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.
- 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