[Monodroid] View onClick attribute support
Jonathan Pobst
monkey at jpobst.com
Tue Mar 1 00:14:34 EST 2011
If you have linking on, try turning that off and see if that helps.
If it still doesn't work, it sounds like a bug. Please file a bug with
a test case so we can fix it.
Thanks!
Jonathan
On 2/28/2011 10:46 PM, Adam Tybor wrote:
> Does MonoDroid support the android:onClick attribute for views? Running
> a test in preview 13 yields me this stack trace
>
> E/AndroidRuntime( 480): java.lang.IllegalStateException: Could not find
> a method Login_OnClick(View) in the activity class android.LoginActivity
> for onClick handler on view class android.widget.Button with id 'Login'
> E/AndroidRuntime( 480): at
> android.view.View$1.onClick(View.java:2131)
> E/AndroidRuntime( 480): at
> android.view.View.performClick(View.java:2485)
> E/AndroidRuntime( 480): at
> android.view.View$PerformClick.run(View.java:9080)
> E/AndroidRuntime( 480): at
> android.os.Handler.handleCallback(Handler.java:587)
> E/AndroidRuntime( 480): at
> android.os.Handler.dispatchMessage(Handler.java:92)
> E/AndroidRuntime( 480): at android.os.Looper.loop(Looper.java:123)
> E/AndroidRuntime( 480): at
> android.app.ActivityThread.main(ActivityThread.java:3647)
> E/AndroidRuntime( 480): at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 480): at
> java.lang.reflect.Method.invoke(Method.java:507)
> E/AndroidRuntime( 480): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
> E/AndroidRuntime( 480): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> E/AndroidRuntime( 480): at dalvik.system.NativeStart.main(Native
> Method)
> E/AndroidRuntime( 480): Caused by: java.lang.NoSuchMethodException:
> Login_OnClick
> E/AndroidRuntime( 480): at
> java.lang.ClassCache.findMethodByName(ClassCache.java:247)
> E/AndroidRuntime( 480): at java.lang.Class.getMethod(Class.java:962)
> E/AndroidRuntime( 480): at
> android.view.View$1.onClick(View.java:2124)
> E/AndroidRuntime( 480): ... 11 more
> W/ActivityManager( 63): Force finishing activity
> Android/android.LoginActivity
>
> Adam
>
>
>
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
More information about the Monodroid
mailing list