I have two projects that I want to share some code, So I set up a third project to hold just the code to be shared, but now i'm not sure what to do. I tried adding it to the java build path library, but that didn't seem to help...
You want to create a Library Project. Sources and Resources from a Library Project can be used from other Android Projects.
make a new project and paste the shared code there. Then right click the project, if using eclipse, and under "android" you can make it a library with checking "is Library". From your project you want to implement the shared code, right click on that project and under "android" you can click "add", and the shared project should be in that dialog.
This is done because eclipse cant export .jar files from projects in your workbench.
http://developer.android.com/guide/developing/projects/projects-eclipse.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With