Open BaoBaoJianqiang opened 6 years ago
Thanks for your report.
Indeed, jOOR (as all the other jOO* libraries) are currently not integration tested for use on Android. We can certainly work around this specific problem, but rest assured that we currently have no intention of formally supporting Android at this point.
Would you mind providing a minimal, complete, verifiable example that helps reproducing the issue? Currently, there's not even a stack trace to help track down the specific call inside of jOOR which fails for you on Android
I can give you a demo, can you run it in your environment?
I don't know :-) Give me instructions on how to set up this environment. If it only takes little time, I'll have a look.
While not having looked to close at the source you have posted, I have had problems with private static final
variables before. Most likely the compiler will have your variable already inlined, thus changing the variable will not have any effect.
class Test {
private static final int value = 3;
public int getValue() {
return value;
}
}
If you change the value
using reflection, most likely getValue
will still return 3
nevertheless.
@ooxi: While that's certainly a problem that may arise, I think the issue here is the fact that Android's reflection API differs from the JDK's
In Android, jOOR doesn't work when reflect final field by jOOR.
Because Field class in Android is different from the same file in JDK, as follows, there is no accessFlags field in this class: