Hello,
<self-confessed newbie to Mono for Android, so this could well be pilot
error>
I am trying to use the Nfc APIs in Android API version 10 from Mono for
Android v 1.9.1.r2-2.
The code in my activity looks like this:
protected override void OnResume()
{
mNfcAdapter.EnableForegroundDispatch(this, mPendingIntent, null,
null);
}
The exception thrown is:
Java.Lang.NoSuchMethodError: Exception of type 'Java.Lang.NoSuchMethodError'
was thrown.
at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string) [0x00024] in
/home/jpobst/Desktop/monodroid/Mono.Android/src/Runtime/JNIEnv.cs:359
at Android.Nfc.NfcAdapter.EnableForegroundDispatch
(Android.App.Activity,Android.App.PendingIntent,Android.Content.IntentFilter
[],string[]) [0x00014] in
/home/jpobst/Desktop/monodroid/Mono.Android/platforms/android-10/src/generat
ed/Android.Nfc.NfcAdapter.cs:83
at MyFirstApp.Activity1.OnResume () [0x00001] in
C:\svn\s3edge\Proto\Venkar\LearnAndroid\MyFirstApp\Activity1.cs:58
at Android.App.Activity.n_OnResume (intptr,intptr) [0x00008] in
/home/jpobst/Desktop/monodroid/Mono.Android/platforms/android-10/src/generat
ed/Android.App.Activity.cs:2411
at (wrapper dynamic-method) object.cf9d5023-0ae1-4d9f-88ba-4f49448e4156
(intptr,intptr) <IL 0x0000c, 0x0002b>
--- End of managed exception stack trace ---
java.lang.NoSuchMethodError: enableForegroundDispatch
at myfirstapp.Activity1.n_onResume(Native Method)
at myfirstapp.Activity1.onResume(Activity1.java:35)
at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
at android.app.Activity.performResume(Activity.java:3832)
at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:2110)
at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2135)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668)
at
android.app.ActivityThread.access$1500(ActivityThread.java:117)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:8
39)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
} Java.Lang.NoSuchMethodError
Can someone shed some light on the error and any potential workarounds?
Thanks!
Venkatesh
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid