Reputation: 2406
I am trying to create an Andoid AAR library to contain commonly used utility functions. I followed the instructions in https://developer.android.com/studio/projects/android-library
exactly. Namely:
1. File->New->New Module
2. Click "Android Library" then Next
3. Tried to use defaults: "My Library", "mylibrary" and SDK Version, but Finish button is grayed out and error message appeared: "The module location is inside Studio's install location."
I see no place to enter a module's location. I've tried variations on Libray name and Module name with no joy.
Am I doing something wrong?
Upvotes: 2
Views: 6113
Reputation: 34255
you are able to use command line tool to create .aar
file
./gradlew <moduleName>:assemble
Upvotes: 0
Reputation: 2406
After days of unsuccessful head-banging with the IDE, I found an astoundingly simple solution in some Google results, namely:
Voila! New library app-debug.aar appears in project/app/build/outputs/aar/
I don't know where the name app-debug came from, but you can rename it afterwards if you like.
UPDATE 7/2/18
I omitted precursor steps to this procedure. They are
1. Create a base project however you normally do.
2. Delete classes and other stuff you don't need in the aar.
3. Follow the steps above.
Upvotes: 3