Baidu experience There is a way:
- 1
Click Start Androidstudio, after the start of the interface.
- 2
Copy the jar you need to add and paste it into the App--src--main--libs folder, The Androidstudio projects that can be run have a directory structure like this.
Can see that although the jar has been copied and pasted, it has not yet been imported, so the contents contained in the jar are not visible. Import jar, you can see the contents of the jar.
- 3
Right-click on the new sticky jar and click on the add as Library in the pop-up menu.
- 4
Select the module you want to import into (equivalent to project in Eclipse in Androidstudio), if it's just a project, The dropdown box has no other content than the app, so click OK to confirm.
- 5
The jar is added to the project.
when it's done, it's automatically generated in the build.gradle below module: compile files (' libs/ Webwork-2.2.4.jar ')
Method Two: is to copy the jar package into the Libs folder, directly to the corresponding module under the Build.gradle and add the above code is also possible,
Method Three: Add in project structure, there is a File dependencecy
Android Studio learning----to import jar packages via Libs