Exporting the RenderBox package
Now that we've finished creating this beautiful
RenderBox library, how do we reuse it in other projects? This is where
.aar files come into play. There are a number of ways to share code between Android projects. The most obvious way is to literally copy pieces of code into the next project as you see fit. While this is perfectly acceptable in certain situations, and in fact should be part of your normal process, it can become quite tedious. What if we have a bunch of files that reference each other and depend on a certain file hierarchy, such as
RenderBox? If you're familiar with Java development, you might say, "Well, obviously just export the compiled classes in a
.jar file." You would be right, ...