Drakosha
Drakosha

Reputation: 12155

problem with android library project - classes not found

I think i do not understand Android Library Project correctly. I'm having the following issue:

  1. i have a library project in a package a.b.c.lib
  2. i have a application which is uses the library project in package a.b.c
  3. i have another application which is uses the library project in package a.b.c.pro

Everything is OK with the application in package a.b.c, however i hit the following issue (during runtime) in the a.b.c.pro app:

java.lang.NoClassDefFoundError: a.b.c.lib.c1$c2

the same class is found OK in the a.b.c app.

So, what is the right way to define packages in this case?

Upvotes: 1

Views: 1731

Answers (1)

Michael
Michael

Reputation: 54705

There's no right way. Every way is right. It should work so I think the problem is not in packages. Do you use Proguard for obfuscation? It can remove some classes which are used in your app. Also such errors happen because of some bugs in the toolchain. Try to clean and rebuild you app .

Upvotes: 2

Related Questions