0

I have two projects:

  • 1- Project "A": Which is the Android app project.
  • 2- Project "B": A huge Android library project that I use in almost all my projects.

I need to import 2 classes by reference from "B" and use them in "A". I don't need the rest of of packages and subclasses of "B" to be built and packaged inside "A"'s apk file.

Tunaki
  • 125,519
  • 44
  • 317
  • 399
Shatazone
  • 2,292
  • 6
  • 27
  • 36

2 Answers2

2

If you use Proguard, you will find it's quite good at stripping unused classes and methods out of the final binary.

Graham Borland
  • 58,983
  • 20
  • 134
  • 177
0

Why don't you export the classes from project B into a jar file and import that jar in project A?

SERPRO
  • 9,867
  • 7
  • 44
  • 63
  • I thought of doing that, but some of these classes rely on the autogenerated R file of Project B – Shatazone Oct 31 '11 at 14:41
  • 1
    Oh.. in that case you should try using Proguard as @Graham suggested. It's very easy to configure: http://stackoverflow.com/questions/4732656/enabling-proguard-in-eclipse-for-android – SERPRO Oct 31 '11 at 14:45