Reputation: 3400
Hi I'm a new in Android development and using Android studio. I need to create *.aar lib. I created New Android library project (empty for now). How to generate *.aar file from it? Can you explain by steps? Has read a lot of topics but still unsuccessful. Thanks.
Upvotes: 2
Views: 5812
Reputation: 677
Here's what has worked for me.
on the command line go to the root directory of the project
ensure that your JAVA_HOME environment variable points to the version of the java sdk you are going to use. On a Mac via the bash shell that would look something like this:
export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home'
(click here to find out how to find your Java Home)
You should now find the .aar file in mymodulename/build/outputs/aar
Thanks to geekgarage for clarification.
Upvotes: 4
Reputation: 3400
Thanks for @pskink, found out, need to build it like: "gradlew assemble" from the root of project.
Upvotes: 1