Here is a little bug I wasn't expecting, when I upgraded to Android Studio 2.2.
1. Write a method to be used for the onClick attribute.
2. Add a Button widget to the layout.
3. Edit the onClick property, in Design view, by selecting from the drop-down in the properties window.
4. Now run the project and you get the error that the method can't be found.
5. Go back to the editor and switch to text view mode.
6, I found the Buttons onClick property contains the method with the Activity name in parenthesis.
when it should be android:onClick="onSubmitButtonClicked"
Make the correction and the error goes away.
Button ocClick property error Tip
Post a Reply
|Oldest Newest Rating|
Java / Android Development
Very popular language used to create desktop applications, website applets, and Android apps.
|Bucky Roberts Administrator|