0

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!

George
  • 235
  • 3
  • 9

2 Answers2

1

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
  • 6,532
  • 4
  • 35
  • 50
  • Thanks very much for the reply. Just found out about the library. They released it just in time :) – George May 23 '10 at 18:39
0

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
  • 43,261
  • 10
  • 79
  • 89