Current location - Recipe Complete Network - Complete cookbook - How to add a library in android studio
How to add a library in android studio
After starting AndroidStudio, open the project that needs to receive the library. For example, there are two projects, project A and library project B, so open project A .. The picture shows the structure of the project, and click the file menu in the upper right corner.

Look for the new-import module in the drop-down menu and click to open the project import window. Note that modules are imported, not projects. In case of Project, AndroidStudio will automatically open a new window for editing. In that case, there would be no library.

Click the browse window on the right of "..." In the opened window, find the location of the library item to be imported in the folder window, select it, and click OK at the bottom to import it.

The details of the module (project) are displayed in the import window. Click Finish to complete the import. It should be noted that the library imported into the AndoridStudio project must also be an AndroidStudio project, not an Eclipse project. If it is an Eclipse project, you need to choose to export the AndroidStudio project.

Select the project tab on the project homepage, and you can see that there are more projects we just imported in the project file structure diagram. The import of the library has been completed. Next, you need to add this library project to the original project, so that you can refer to the contents of the Librara project normally.