I'm building my first Android app and its nearly ready for release. One thing I'm still stumped on is the best way to release multiple versions of the same application. Android – multiple custom versions of the same app is a getting a bit old now and I'm wondering if the new tooling released by Google (r14) offers any new solutions. The latest Android Developer's blog post (Changes to Library Projects in Android SDK Tools, r14) suggests that there are new ways of handling libraries. I'm not knowledge enough about libraries to understand if this presents a new solution. If so, is it a big effort to convert an app that wasn't built with libraries in mind? Thanks!
1 Answers
I'm wondering if the new tooling released by Google (r14) offers any new solutions
Not particularly. As the SO answer you linked to indicated, Android library projects are the preferred solution. Android library projects are getting increasingly sophisticated.
If so, is it a big effort to convert an app that wasn't built with libraries in mind?
That is a bit difficult to answer in the abstract. It's very much like asking: how difficult is it to take a monolithic Java app and create a JAR out of part of it? It all depends on what your code base looks like and whether or not there is a clean separation between components.
You did not indicate what you mean by "multiple versions of the same application", and so it is even more difficult to tell you whether Android library projects will help you with whatever "multiple versions of the same application" means to you. To me, "multiple versions of the same application" means v0.1, v0.2, v0.3, in which case you don't need Android library projects -- that's just android:versionCode
and android:versionName
in the manifest.

- 986,068
- 189
- 2,389
- 2,491
-
Thanks CommonsWare, much appreciated. By multiple versions, I should have been more clear. I meant different flavours of the same version (e.g. an ads support free version and a premium version) – Chris Knight Oct 26 '11 at 14:44
-
@ChrisKnight: Yeah, that's the scenario that Android library projects were made for. Most of your free code probably winds up in the library project (to share between apps). – CommonsWare Oct 26 '11 at 14:45