Admit it. When you’ve been developing an Android app how often have you looked at other Android libraries to help you out with your own project? The value of an Android library is obvious to anyone familiar with developing for the platform, so it might be time to consider how to give back to the community by creating your own Android library. Here’s how to get started.
Creating a library is easy. Simply add a new module to your project and select ‘Android Library’ from the list of options and, when prompted, choose “add no activity”. Your project now has a new library module that will appear next to your main project. Next you’ll need to create an XML layout and a Java Class. Once you’ve done that you’ll be able to test it out locally. Now you’ll be able to make changes and test it out before releasing it. You’ll also need to use Bintray to upload and publish your library. It’s a free platform, but it does require an account. Bintray will host the library and even allow the library to be searchable via JCenter, which is Android Studio’s default repository of libraries.
Creating a library does involve lots of work. It takes time and energy that you might rather devote to actual app development – or your own free time. But making a library available is a great way to support a burgeoning community of Android developers and can help show off your work. It’s incredibly valuable to have your libraries available and easy to access if you’re looking for jobs in the app development world. Think of it like a portfolio of your work! Plus, it’s good karma.
If you’re interested in creating an Android library, check out the article below for an in-depth, step-by-step tutorial for creating and publishing your Android library!
Read the full article here: Creating and Publishing an Android Library