problem with android library project - classes not found
I think i do not understand Android Library Project correctly. I'm having the following issue:
- i have a library project in a package
a.b.c.lib
- i have a application which is uses the library project in package
a.b.c
- 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?
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 .
精彩评论