views:

32

answers:

2

Hello all, I was wondering if its possible to reference one android project from another android project. I have two projects, test1 and test2. I have added test2 in the project properties of test1 under the projects tab. Unfortunately it keeps throwing a NoClassDefFoundError. Also, would the second android project (test2) be installed as a separate apk on the phone or would it be part of the encapsulating android project (test1) ?

Thanks very much!

A: 

You may also extract the common functionality into the third project and reference it. This should be a regular Java project not the Android project. So it will produce jar that you can reference.

Fedor
A: 

Just be aware that if test2 contains resources, these will not automatically be packaged in a non-android project and the R file will not be auto-generated.

I suggest that you look at release 6 of the SDK tools (released this week), they now support library projects.

Nic Strong
Thanks very much for the reply. Just found out about the library. They released it just in time :)