I am attempting to shoehorn an existing SDK onto an android device and one of the dependencies of said SDK is Apache log4j. I am able to load my test program onto the android emulator but when the log4j object "PropertySetter" is called the program fails with a verification exception. Is there a way to ameliorate this issue?
A:
If you can't modify the existing SDK to remove the dependency on log4j, then the only solution will be to implement a port for it in Android. The "easiest" way will be to implement empty clones of all log4j classes. Of course this is a cumbersome task and I don't think that anyone has done that already, since Android offers a very decent logging mechanism of its own.
kgiannakakis
2010-05-26 17:18:12
A:
I would recommend trying to swap in slf4j in place of log4j. It's not a painless switch but its likely to be easier than what you have. slf4j provides a common front-end for several loggers including log4j and there is an slf4j-android package.
No, Android's logging mechanism is not decent. It's very inadequate compared to what log4j can do for you.