I have read a lot answers related to this topic, but none of them have worked to solve my problem, so need help with this:
I need to import a .aar file into a project created with Android Studio 1.1.0, I have imported it using the "New Module" option and actually I don't receive any error, I can build the application and run it, but when I try to use a class from this .aar file Android Studio doesn´t find the reference to it, let's say it can´t recognize the package that I want to include in my code.
You are maybe thinking that I must add the dependency, I have already done that, It seems to not work.
So someone could tell me which is the correct way to import and use a .aar file in Android Studio 1.1.0
Add your AAR or JAR as a dependencyNavigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Jar Dependency in the dropdown. In the Add Jar/Aar Dependency dialog, first enter the path to your . aar or .
In android studio, open the Project Files view. Find the . aar file and double click, choose "arhcive" from the 'open with' list that pops up. This will open a window in android studio with all the files, including the classes, manifest, etc.
Android Studio can be used to create an Android archive file (*. aar) that can contain classes and methods that make use of Android classes and related files. Like creating the Jar file, an Android project must be created first, then the Android library module can be created and added.
To import an .aar library:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With