To convert a string to a resource, I use the following method.
public static int getResId(String variableName, Class<?> c) { try { Field idField = c.getDeclaredField(variableName); return idField.getInt(idField); } catch (Exception e) { e.printStackTrace(); return -1; } }
When using ProGuard, this method does not work! What needs to be added to proguard.cfg?