Android Studio Library Dependencies
1. Dependent on the local Libs folder
Compile files (' Libs/g726.jar ')
2. Rely on another moudle (equivalent to eclipse dependent on another project)
Compile project (': library ')
Note: Where the library is the name of another moudle
3. A jar file that relies on a path to a local hard disk
Compile Filetree (dir: ' D:\\localrepository ', include:[' Task_util.jar '])
Note: d:\\localrepository is a local path directory Task_util.jar a jar file that needs to be relied upon in that directory
4 Network dependencies
Compile ' com.google.code.gson:gson:2.2.2 '
Note: Com.google.code.gson for package name Gson for Project name 2.2.2 Version number
Native So library dependent
In Android Studio's 0.7.2 version of the Android plugin, Google introduced a new directory ' Jnilibs ' in the project's source sets. This means that we can copy the pre-compiled. So files into this directory, and then the Android plugin will help us package these native libraries into the APK.
.
├──androidmanifest.xml
└──jnilibs
├──armeabi
│└──libsnappydb-native.so
├──armeabi-v7a
│└──libsnappydb-native.so
├──mips
│└──libsnappydb-native.so
└──x86
└──libsnappydb-native.so
Android Studio Package Dependent