Finally, I found my answer in a similar way. I used to want to put the Jar library (containing activity) in another android project, but I found that I can include all the library code in a new project as follows: 1- Right-click the apk project and go to "Properties". 2- Select "Android" from the left table. 3- Click the "Add ..." button on the bottom panel below "Is a library." 4- In the list that opens, click on the corresponding library project.
The result will be funny. You will have two packages in the "gen" folder and two "R.java" folders, and also your id will be included in the second project. You can access library project variables.
When you run the build command, it will simply include the packages and classes used.
source share