Android Studio Reference Library project is not difficult, directly add dependent module can, but I have some strange problems during the operation, the bitter disturbance I all day, in order to sacrifice this poor day special mark.
First describe my error phenomenon:
After the studio configuration is complete, I can't wait to create a project, import the previously used library project (Eclipse Project) into studio, and then create a project reference to see how it works, the following describes the issues that are encountered with two items:
A problem occurred:
1, call the Library engineering method is normal, but in the run time prompt me to start the icon error, because the Library project and project engineering settings of the start icon point to the same name of the picture (for example, two items in the icon as the boot), the solution is to rename our app icon, or delete the settings launch icon from the Library project manifest file
2, the project code without error operation, but our project interface blank is not normal display (not the project setup of the start interface); Error cause-Inventory file Setup problem for library project, Workaround: Remove the entry activity settings from the Library project
Library Project Settings:
For Androidstudio, what is the symbol for a module for the library project? Where do we need to set up? Here's a look at three places I'm talking about and how they work.
Difference one: Build.gradle the arrow is set to the library (arrow 1), the normal item is application
Difference two: Do not set ApplicationID in Defaultconfig
Difference Three: The program entry is not set in the manifest file
Note: Reference Library Engineering Method:
There are three reference libraries in Studio: 1, jar 2, link Form 3, Source Library project reference (the advantage is that you can modify their library source code at any time, you can make the project reference and the library to update). The first two forms are very simple and add dependencies directly.
1. Right-click on the project that needs to be referenced, select Open module settings, or directly use the shortcut key F3:
2. Select the project name (Arrow 1) in the Setup Panel and choose the dependent settings (Arrow 2), click + to select the dependencies you want to add
3, select the added dependent library (Arrow 1) in the pop-up selection box, click OK to confirm (Arrow 2)
4, add after the completion of the main settings panel Click OK, the project automatically rebuild, this reference work completed
From for notes (Wiz)
Android Studio relies on library project activity display problems and library engineering settings