proguard.ParseException: Expecting class member name before ‘@’

Possible problem call a function in onClick procedure by string from string.xml:

// function in Activity.java
public void myClickHandler(View view){
 
} 
 
// right implementation at onClick in activity.xml
<Button
                    android:onClick="myClickHandler"
 />
 
// bad impementaiton
<Button
                    android:onClick="@string/myClickHandler"
 />
This entry was posted in Android Examples Code, Bugs, warnings, errors and tagged , . Bookmark the permalink.


Comments are closed.



2,125 views