Android seems to have brought back the android libray project creation in Android latest studio. Below given the steps for it
Go to File -> New -> New Module
Select Java Library at the end of Options List
Enter the name of the jar lib and name of the class and hit finish action
Now as usual we can add this as dependancy by right clicking the app module and on the dependancy tab, press + and select the newly created
jar file as dependancy.
After building, if notice in the build / libs folder, the jar file can be found with the name classes.jar. This can be distributed across.
To note, if right click and try to add resource folder to this directory, we cannot find the option to add resource directory unlike it can be
found when right clicking on the library module project which outputs aar file.
References:
No comments:
Post a Comment