Trying to import .aar file into project but cannot find the option of import .jar/aar package
inside the add new module.
Asked
Active
Viewed 1,247 times
0

General Grievance
- 4,555
- 31
- 31
- 45

LeMeLon1234
- 13
- 2
2 Answers
1
Copy your aar/jar file to module "libs" folder ( create "app\libs" folder if not exist ) and add this line to your module Build.gradle file:
implementation files('libs/your_lib_name.aar')

Morteza.J
- 26
- 1
0
You must have a project-level "libs" folder. If you have this directory with .aar/.jar files, you can just add a new .aar/.jar file to this folder.
If you don't have this directory, see this answer
But you can use this:
implementation fileTree (dir: "libs", include: ["* .jar", "* .aar"])
instead of adding a new file implementation to the gradle every time:
implementation files('../libs/testaarfile.aar')

Leonid
- 999
- 1
- 7
- 14