mercredi 8 novembre 2017

How get value of static field in another package's class via reflection

How I can get value of static field in another package?

I need know string values of .R class or similar. I try use something like this:

Class.forName("com.notmypackage.R$string").getDeclaredFields();

but none success, got exception.

There any way to get alien ***.R$string values?





Aucun commentaire:

Enregistrer un commentaire