On Jun 4, 2012, at 5:50 AM, S.J. Visschers wrote:
> I've tried to implement the code you have posted. But when I run the app, I 
> get a NoClassDefException in the facebook.cs on the following line.
> 
> private static IntPtr _class_ref = 
> JNIEnv.FindClass("myapp/facebook/FacebookHelper");

Where did you copy this line of code from? The previous email had:

        private static IntPtr _class_ref = 
JNIEnv.FindClass("com/Exterminator/Game/FacebookHelper");

The class name used in JNIEnv.FindClass() must match an actual Java class 
packaged with your app. In this case, warren wrote a 
com.Exterminator.Game.FacebookHelper type, so the JNIEnv.FindClass() call needs 
to use the ~same value.

> The package of the facbookhelper.java is in my case "myapp.facebook".

Did you properly update the FacbookHelper.java to use that package? Does that 
file have a Build action of AndroidJavaSource?

It may be helpful to provide the full diagnostic MSBuild output from building 
your project, to ensure that FacebookHelper.java is getting built and included 
into your .apk.

Thanks,
 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to