Now there's an Android project A. We wanted to extend the functionality of a, but didn't want to develop on a basis, so we created another Android project B and wanted to refer to a in B.
One idea is to make engineering a a pure jar bag so that other projects can be referenced directly.
However, if you use a reference in R.java in Project A, you cannot make a jar package. The reason is that R.java are generated automatically and are dynamic, and each compilation is not the same. If you must make a jar package, you can not use the automatically generated r file, use the resources to write code to obtain.
Another idea is to make engineering a the Android library project.
Set up Project A, right-click->properties->android, select the IS library item, and then apply. Set Project B, right key->properties->android, in the library, click the Add button, add a project, and then apply. The resources and code in A are introduced in B, and these resources and code can be invoked directly. It's important to note that because a is no longer a complete Android application, it's a class library project, so some of the content needs to be configured in B. For example, a Lib library reference, B also to join the Lib library, such as the content of the Androidmanifest.xml file in a, b in the Androidmanifest.xml file should be added ...