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
  • 132,869
  • 46
  • 340
  • 423
Shatazone
  • 2,422
  • 6
  • 28
  • 38

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
  • 60,055
  • 21
  • 138
  • 179
0

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

SERPRO
  • 10,015
  • 8
  • 46
  • 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