When I'm debugging my app all works, but when I build APK (Debug, release, signed..) it crashes after I press the button.
My onClick method:
protected void Click(View V) {
Toast.makeText(this, "Hi!", Toast.LENGTH_SHORT).show();
}
Button XML:
<Button
android:id="@+id/btnSpy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:onClick="Click"
android:text="Activate"
android:textAllCaps="false"
tools:layout_editor_absoluteX="148dp"
tools:layout_editor_absoluteY="212dp" />
EDIT: Sorry forgot to change Spy to Click