First, the method of importing a third-party jar is actually simpler, the following steps:1> Libs the jar package to be imported under the project 2> right-click on the imported Jar package and select "Add as Library" 3> This time can be found in the app under the Build.gradle in the following description: "Compile XXXX", indicating that the import jar file was successful. Second, the import of third-party library files in contrast, the project or module of the previous eclipse is actually converted into an executable project or module under Android Studio. We can do this in the following way:1> will be placed from the Web under the third-party project in the catalog, so that in Android studio you will find that there will be a directory of this file. 2> Note that it is important that only the files of the library or Lib directory in the third-party library file are libraries. 3> we need to add a reference to the Setting.gradle file under the project (in Gradle, the ":" Colon represents the directory delimiter, and the root directory is the project directory.) Note Add a reference to the library file ) 4> Click File, select Project structure, select the module to which you want to add the library file, select Add Dependent 5>, You will find that there is more than one row referenced in the Build.gradle file of the module you selected above compile project (XXXXX) 6> The above is not finished, you need to add a Build.gradle file under the library file directory you added ( The diagram above is intercepted later, so there is a need to generate this file. 7> how to generate a Build.gradle file (I will only do this-_-!): Import library files that need to be imported into eclipse and then we select Then choose the library file that needs to generate the build.gradle, so that we can just copy the file to Android studio, and note that it's going to be copied to the library file directory. 8> Qiang Qiang! , compile and pass just fine.
Ways to import third-party jar packages and third-party library files in Android Studio