mail-archives/monodroid/2011-December/007562.html

180 строки
6.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] Java.Lang.NoClassDefFoundError: java.lang.ICharSequence
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Java.Lang.NoClassDefFoundError%3A%0A%09java.lang.ICharSequence&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="007605.html">
<LINK REL="Next" HREF="007594.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] Java.Lang.NoClassDefFoundError: java.lang.ICharSequence</H1>
<B>Tossing, Chris</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Java.Lang.NoClassDefFoundError%3A%0A%09java.lang.ICharSequence&In-Reply-To="
TITLE="[mono-android] Java.Lang.NoClassDefFoundError: java.lang.ICharSequence">ctossing at touchcominc.com
</A><BR>
<I>Tue Dec 6 08:13:19 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="007605.html">[mono-android] 4.0 Upgrade Issues MonoDevelop 2.8.4.1 / MacOS X Snow Leopard
</A></li>
<LI>Next message: <A HREF="007594.html">[mono-android] Java.Lang.NoClassDefFoundError: java.lang.ICharSequence
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7562">[ date ]</a>
<a href="thread.html#7562">[ thread ]</a>
<a href="subject.html#7562">[ subject ]</a>
<a href="author.html#7562">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Greetings,
First off, I want to recognize how enormously better the debugging is in M4A 4.0. Thank you!
I am able to launch and run our application, but I am getting a Java.Lang.NoClassDefFoundError exception when trying set the items of an AlertDialog using AlertDialog.Builder.SetItems(..).
Here is our code:
var builder = this.CreateDialog(title, null)
.SetItems(items, (s, e) =&gt; { CallResultHandler(resultHandler, (int)e.Which); })
.SetNeutralButton(defaultText ?? &quot;Cancel&quot;, (s, e) =&gt; { CallResultHandler(resultHandler, null); });
The call to SetItems is what is failing (items is of type string[]).
I am getting the below Debug output:
===================================================================
Java.Lang.Throwable: java.lang.ICharSequence in loader dalvik.system.PathClassLoader[/data/app/OFM_Home.MD-1.apk]
Exception:
Java.Lang.NoClassDefFoundError: java.lang.ICharSequence
Unhandled Exception:
Java.Lang.NoClassDefFoundError: java.lang.ICharSequence
Exception:
Java.Lang.NoClassDefFoundError: java.lang.ICharSequence
Unhandled Exception:
Java.Lang.NoClassDefFoundError:
[ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.NoClassDefFoundError: Exception of type 'Java.Lang.NoClassDefFoundError' was thrown.
at Android.Runtime.JNIEnv.FindClass (System.String classname) [0x00000] in &lt;filename unknown&gt;:0
at Android.Runtime.JNIEnv.FindClass (System.Type type) [0x00000] in &lt;filename unknown&gt;:0
--- End of managed exception stack trace ---
java.lang.NoClassDefFoundError: java.lang.ICharSequence
at mono.android.view.View.OnClickListenerImplementor.n_onClick(Native Method)
at mono.android.view.View.OnClickListenerImplementor.onClick(OnClickListenerImplementor.java:27)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9089)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3806)
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:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: java.lang.ICharSequence in loader dalvik.system.PathClassLoader[/data/app/OFM_Home.MD-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
... 13 more
In mgmain JNI_OnLoad
The program 'Mono' has exited with code 255 (0xff).
===================================================================
Mono for Android 4.0 looks great so far, though!
Thank you,
Chris Tossing
Software Engineer
Touchcom
A G4S Technology Company
Direct Dial: +1 (781) 457-0779
Cell: +1 (847) 942-0359
<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">ctossing at touchcominc.com</A>&lt;mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">ctossing at touchcominc.com</A>&gt;
www.touchcominc.com&lt;<A HREF="http://www.touchcominc.com/">http://www.touchcominc.com/</A>&gt;
21 North Avenue, Burlington, Massachusetts USA
P Please consider the environment before printing this email
The details of this company are as follows:
Touchcom Inc, Registered Office: 21 North Avenue, Burlington, MA 01803.
This communication may contain information which is confidential, personal and/or privileged.
It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.
Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.
Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.
This e-mail has been scanned for all viruses by MessageLabs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/monodroid/attachments/20111206/94685a6d/attachment-0001.html">http://lists.ximian.com/pipermail/monodroid/attachments/20111206/94685a6d/attachment-0001.html</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="007605.html">[mono-android] 4.0 Upgrade Issues MonoDevelop 2.8.4.1 / MacOS X Snow Leopard
</A></li>
<LI>Next message: <A HREF="007594.html">[mono-android] Java.Lang.NoClassDefFoundError: java.lang.ICharSequence
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7562">[ date ]</a>
<a href="thread.html#7562">[ thread ]</a>
<a href="subject.html#7562">[ subject ]</a>
<a href="author.html#7562">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
mailing list</a><br>
</body></html>