Android Studio is Google's push development tool, and the introduction of the library is a big difference from the traditional eclipse.
One, jar package
The first step, the Libs in the project directory, is to copy the jar inside. Such as:
The second step, switch to the Android directory, open Build.gradle (Module:app). Such as:
Then, the program needs to be compiled into code that needs to be added manually or GUI settings .
Add Manually:
Generally there is a piece of things, add a sentence to let the program compile your just copy of the jar.
If I'm gson-1.6.jar, it's a complete code snippet.
Graphical interface settings are added automatically:
Shortcut key ctrl+alt+shift+s or menu File->project structure
After you see this interface, select the left side of the Modules->app, then click on the tab on the right dependencies, then click on the right side plus, click File
Easily Select Libs Add
Second, the Library project package
The first step is to copy the third-party project package to the project.
The second step, the third party project to add to their own projects, Settings.gradle, plus ': Canvasdemo ', this is I add the project include, and then sync a bit gradle.
The third step, similar to the above add jar package, two ways, I will briefly say, two ways.
To add a build manually:
Switch to Android directory, open Build.gradle (Module:app), and add a sentence
Such as:
To add a compilation automatically:
Shortcut key ctrl+alt+sshift+s or menu File->project structure
After you see this interface, select the left side of the Modules->app, then click on the tab on the right dependencies, then click the plus sign on the right, click the module
And then you know,
The Guide Package illustration tutorial is complete. The next article or guide package, will be specific to the case guide package for text and graphics.
Android Studio Tutorial (illustrated) for importing libraries in various situations