sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server
http://sta.github.io/websocket-sharp
MIT License
5.67k stars 1.65k forks source link

unity3d 5 android throws TypeInitializationException socket Net.Dns #207

Open rastinrastini opened 8 years ago

rastinrastini commented 8 years ago

Hi when i run on android get this exeption:

"System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.Sockets.Socket ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'.\n at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in :0 \n at System.Activator.CreateInstance (System.Type type) [0x00000] in :0 \n at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in :0 \n at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in :0 \n at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in :0 \n at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0 \n --- End of inner exception stack trace ---\n at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0 \n at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in :0 \n at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in :0 \n at System.Net.Sockets.Socket.CheckProtocolSupport () [0x00000] in :0 \n at System.Net.Sockets.Socket..cctor () [0x00000] in :0 \n --- End of inner exception stack trace ---\n at System.Net.Dns..cctor () [0x00000] in :0 "

Thankful.

sta commented 8 years ago

Hello there,

Could you please describe MORE about your build settings in Unity and what you have done in Unity?

I guess that is same as the followings:

yuanxinchao commented 7 years ago

image Try set Stripping level to Disabled