Search code examples
androidaar

How to create *.aar file from "existing" android studio project ( Not creating new android library)?


I searched how to create *.aar file but all of them say to create library then add your classes then Double click assemble ... the *.aar is created in build/...

but I need to create *.aar file from existing (already created and coded) project

so my question is :

how to create *.aar file from "existing" android studio project ( Not creating new android library) ?

Thanks in advance


I did Morrison Chang's solution (thx)

the solution to convert project to library

made it as module library after double clicking on assemble some errors come : you can see errors here


Solution

  • I did what morrison said I got that error which i sent as photo the solution for that error was just to "Rebuilt project" after "File/Sync project ..." ( which is funny :) )

    now I have aar file in my app/build/...

    result as *.aar