Warning: I'm not known for being the smartest guy in the room. That said...

On Oct 13, 2011, at 8:47 AM, Nicklas Møller Jepsen wrote:
> The main problem is that I’m seeing completely different behavior when 
> running the app from VS (on a device) compared to manually copying the APK to 
> the same the device and installing it. How can this be?

There are _lots_ of potential reasons for this. :-)

1. Release builds (which are deployable to the Android Market, and which you 
mentioned later) bundles the runtime and links all required assemblies in order 
to minimize application size. Debug builds don't do that (by default):

        http://docs.xamarin.com/android/advanced_topics/linking

This is the most plausible reason for your ClassNotFoundException -- you've 
performed a Release (linking) build, and the linker failed. Try rebuilding with 
linking disabled for whatever assembly contains the missing type, and please 
file a bug at bugzilla.xamarin.com (assuming that the "much smarter" linker in 
1.9.1 doesn't fix the issue).

2. For Debug builds (by default), Installing a .apk outside of the IDE won't 
result installing the required shared runtime packages, which will result in 
numerous errors when attempting to launch the application.

3. The shared runtime is not ABI stable. If you deploy the shared runtime to 
your device and then later upgrade your Mono for Android install, if the shared 
runtime isn't upgraded on your device all sorts of bizarre things will break.

I'm probably missing other scenarios, and the differences between Release and 
Debug builds will only increase over time (in order to speed up developer 
turnaround while debugging).

As far as the TypeInitializationException from System.Net.Sockets.Socket, 
unfortunately we're going to need a bug filed for that one, as we don't see any 
way for an exception to be emitted from the System.Net.Sockets.Socket static 
constructor:

        
https://github.com/mono/mono/blob/mono-2-10/mcs/class/System/System.Net.Sockets/Socket_2_1.cs#L770

If someone seeing this could file a bug with a reproducible test case, it would 
be much appreciated.

Thanks,
 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

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

Reply via email to