I have an APP with a separate package for PUSH notification, I would like to take this package and turn it into Library , so in future apps I only add the Library > in my project.
How can I do this?
EDIT
IDE: Eclipse
I have an APP with a separate package for PUSH notification, I would like to take this package and turn it into Library , so in future apps I only add the Library > in my project.
How can I do this?
EDIT
IDE: Eclipse
With Eclipse you can create a JAR file containing classes and project information. Unlike .jar
files, AAR files, possibly created using Android Studio, may contain Android features and a manifest file, which allows you to package shared features such as layouts and drawables , as well as Java classes and methods.
Mark this project as a lib.
See the picture:
Thenyoujustimportintoyourmainprojectasalibrary.Foraccess,right-clicktheprojectandgotoproprieties>Android.Seetheimagebelow:
Seealso create a library using Android Studio
I do this: (assuming you know how to use github
apply plugin: 'com.android.application'
to apply plugin: 'com.android.library'
Quite easy to do ..
First you will need to open the build.gradle
of the module you want to behave like a library, and then switch apply plugin: com.android.application
to apply plugin: com.android.library
Now it will create an .AAR instead of an .APK.
Adding a dependency is also smooth, so I advise you to read it here: link
I recently had the same need. I read a John Gabriel post and solved my problems. Follow link: