George
George

Reputation: 235

Interdependent android projects

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!

Upvotes: 0

Views: 203

Answers (2)

Nic Strong
Nic Strong

Reputation: 6592

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.

Upvotes: 1

Fedor
Fedor

Reputation: 43412

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.

Upvotes: 0

Related Questions