In the ProGuard docs it reads: “Google’s Dalvik VM can’t handle overloaded static fields.”
As I understand it, something like this
public class A {
private static final Log log = LogFactory.getLog(A.class.getName());
...
}
public class B extends A {
private static final Log log = LogFactory.getLog(B.class.getName());
...
}
is bad on Android then. It this really true or did I get something wrong?
What are the implication then (I can run my code now but dex fails after proguard treatment)?
I assume it means you can’t have two fields in class
A, both namedlog, each of different types:You can’t do this in source code, but tools like ProGuard can generate
.classfiles like this that make decompilation more interesting.You don’t need to worry about your
B extends Aexample; that would be a bug in Dalvik. Such a bug would be fixed very promptly!