0

Try to import aar file into project but cannot find the option of "import .jar/aar package" inside the add new module

2 Answers2

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
  • 330
  • 1
  • 9