If the library is a JAR do the following:
1) Copy the JAR file to the <diretorio do projeto>/libs
directory
2) In Android Studio, in the project structure, enter the libs
folder, select the library you just added, click the context menu (right mouse button) and select the option Add as Library...
There is another way to do the same:
1) Same step 1 above
2) Select the File > Project Structure
option (there is a shortcut button on the Configure Project Structure
toolbar that does the same thing)
3) In the window that opens, in the leftmost panel select Libraries
4) In the middle pane, select the +
button to add a new library by selecting the JAR file you copied
In the case of the Expansion Library and the Licensing Library (which are sources), after they have been installed via the SDK Manager, go to the directory where the sources and resources of these libraries have been installed:
On Mac you are in:
-
/Applications/Android Studio.app/sdk/extras/google/play_apk_expansion/downloader_library/src
-
/Applications/Android Studio.app/sdk/extras/google/play_apk_expansion/downloader_library/res
-
/Applications/Android Studio.app/sdk/extras/google/play_apk_expansion/zip_file/src
-
/Applications/Android Studio.app/sdk/extras/google/play_licensing/library/src
-
/Applications/Android Studio.app/sdk/extras/google/play_licensing/library/res
Copy the contents of sources to
<projeto>/src/main/java
, the resources to
<projeto>/src/main/res
and click the
Sync Project with Grade Files
button.
I hope it helps.