{"id":4293,"date":"2016-07-05T22:15:19","date_gmt":"2016-07-05T14:15:19","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=4293"},"modified":"2016-07-05T22:18:36","modified_gmt":"2016-07-05T14:18:36","slug":"android-missingmethodexception-method-not-found-default-constructor-not-found","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2016\/07\/05\/android-missingmethodexception-method-not-found-default-constructor-not-found\/","title":{"rendered":"Android: MissingMethodException: Method not found: &#8216;Default constructor not found&#8230;"},"content":{"rendered":"<p>Suddenly started getting these error messages on device (build worked fine otherwise, but tcp socket stopped working)<br \/>\nYou can view device log with command line&gt; adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG<\/p>\n<p><strong>Solutions:<\/strong><br \/>\n&#8211; Use IL2CPP build instead of Mono2x<br \/>\n&#8211; Or, set Stripping Level: Disabled (any other stripping level didn&#8217;t work)<\/p>\n<p>Probably the cause was changing Api Compatibility Level from &#8220;.net 2.0 Subset&#8221; into &#8220;.net 2.0&#8221;..<\/p>\n<p><code><\/p>\n<p>I\/Unity\u00a0\u00a0 (20578): MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'.<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Activator.CreateInstance (System.Type type) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578): Rethrow as ConfigurationErrorsException: Erro<br \/>\nI\/Unity\u00a0\u00a0 (20578): MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'.<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Activator.CreateInstance (System.Type type) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578): Rethrow as ConfigurationErrorsException: Erro<br \/>\nD\/dalvikvm(20578): Trying to load lib \/data\/app-lib\/com.app.someapp-315\/libvrunity.so 0x42db5ef8<br \/>\nD\/dalvikvm(20578): Shared lib '\/data\/app-lib\/com.app.someapp-315\/libvrunity.so' already loaded in same CL 0x42db5ef8<br \/>\nD\/dalvikvm(20578): Trying to load lib \/data\/app-lib\/com.app.someapp-315\/libvrunity.so 0x42db5ef8<br \/>\nD\/dalvikvm(20578): Shared lib '\/data\/app-lib\/com.app.someapp-315\/libvrunity.so' already loaded in same CL 0x42db5ef8<br \/>\nI\/Unity\u00a0\u00a0 (20578): MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'.<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Activator.CreateInstance (System.Type type) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity\u00a0\u00a0 (20578):\u00a0\u00a0 at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in &lt;filename unknown&gt;:0<br \/>\nI\/Unity (20578): Rethrow as ConfigurationErrorsException: Erro<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Suddenly started getting these error messages on device (build worked fine otherwise, but tcp socket stopped working) You can view device log with command line&gt; adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG Solutions: &#8211; Use IL2CPP build instead of Mono2x &#8211; Or, set Stripping [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4294,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Android: MissingMethodException: Method not found: 'Default constructor not found...","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[148,3],"tags":[197,188,481,884],"class_list":["post-4293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-help","category-unity3d","tag-android","tag-build","tag-error","tag-missingmethodexception"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2016\/07\/console.jpg?fit=402%2C222&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-17f","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=4293"}],"version-history":[{"count":5,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4293\/revisions"}],"predecessor-version":[{"id":4299,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/4293\/revisions\/4299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/4294"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=4293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=4293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=4293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}