0

i was working on an app. everthing was running ok... than I closed visual studio and re-opened. than nothing seem to be working. If I launch app, than it will open but it will get stuck before going to 1st page of app

i already tried to clean / rebuild but with no luck and no idea where the issue is. any idea as to how can i debug this?

If you look at middle of the error on line[me.idcardwalle] this seem to be wrong project name. correct name should be idcardwallet

[Mono] Loading reference 0 of /data/data/com.companyname.idcardwallet/files/.__override__/Stormlion.ImageCropper.Android.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
[Mono] Assembly Ref addref Stormlion.ImageCropper.Android[0x715c75ed00] -> mscorlib[0x715d31e280]: 30
[Mono] Requesting loading reference 16 (of 20) of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll
[Mono] Loading reference 16 of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll asmctx DEFAULT, looking for Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[Mono] Assembly Ref addref IDCardWallet.Android[0x715d31e680] -> Xamarin.Essentials[0x7145c23d00]: 2
[Mono] Requesting loading reference 6 (of 8) of /data/data/com.companyname.idcardwallet/files/.__override__/Xamarin.Essentials.dll
[Mono] Loading reference 6 of /data/data/com.companyname.idcardwallet/files/.__override__/Xamarin.Essentials.dll asmctx DEFAULT, looking for Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
[Mono] Assembly Ref addref Xamarin.Essentials[0x7145c23d00] -> Java.Interop[0x7145c77d00]: 15
[Mono] Requesting loading reference 1 (of 20) of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll
[Mono] Loading reference 1 of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll asmctx DEFAULT, looking for IDCardWallet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[Mono] Assembly Ref addref IDCardWallet.Android[0x715d31e680] -> IDCardWallet[0x715c75e280]: 2
[Mono] Requesting loading reference 2 (of 17) of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.dll
[Mono] Loading reference 2 of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.dll asmctx DEFAULT, looking for Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
[Mono] Assembly Ref addref IDCardWallet[0x715c75e280] -> Xamarin.Forms.Core[0x7145c4c800]: 6
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for 'java_interop_jnienv_call_nonvirtual_void_method_a'.
[Mono] Probing 'java_interop_jnienv_call_nonvirtual_void_method_a'.
[Mono] Found as 'java_interop_jnienv_call_nonvirtual_void_method_a'.
[me.idcardwalle] Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
[me.idcardwalle] Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
[me.idcardwalle] Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
[me.idcardwalle] Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
[me.idcardwalle] Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
[Mono] Requesting loading reference 17 (of 20) of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll
[Mono] Loading reference 17 of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll asmctx DEFAULT, looking for Plugin.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[Mono] Assembly Ref addref IDCardWallet.Android[0x715d31e680] -> Plugin.Media[0x715c75e580]: 2
[Mono] Requesting loading reference 0 (of 7) of /data/data/com.companyname.idcardwallet/files/.__override__/Plugin.Media.dll
[Mono] Loading reference 0 of /data/data/com.companyname.idcardwallet/files/.__override__/Plugin.Media.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
[Mono] Assembly Ref addref Plugin.Media[0x715c75e580] -> mscorlib[0x715d31e280]: 31
[Mono] Requesting loading reference 18 (of 20) of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll
[Mono] Loading reference 18 of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll asmctx DEFAULT, looking for Xamarin.Forms.PancakeView, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
[Mono] Assembly Ref addref IDCardWallet.Android[0x715d31e680] -> Xamarin.Forms.PancakeView[0x7145c4c900]: 2
[Mono] Requesting loading reference 0 (of 7) of /data/data/com.companyname.idcardwallet/files/.__override__/Xamarin.Forms.PancakeView.dll
[Mono] Loading reference 0 of /data/data/com.companyname.idcardwallet/files/.__override__/Xamarin.Forms.PancakeView.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
[Mono] Assembly Ref addref Xamarin.Forms.PancakeView[0x7145c4c900] -> mscorlib[0x715d31e280]: 32
[Mono] Requesting loading reference 19 (of 20) of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll
[Mono] Loading reference 19 of /data/data/com.companyname.idcardwallet/files/.__override__/IDCardWallet.Android.dll asmctx DEFAULT, looking for Xamarin.Forms.Platform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
[Mono] Assembly Ref addref IDCardWallet.Android[0x715d31e680] -> Xamarin.Forms.Platform[0x7145c4cb00]: 2
[Mono] Requesting loading reference 0 (of 5) of /data/data/com.companyname.idcardwallet/files/.__override__/Xamarin.Forms.Platform.dll
[Mono] Loading reference 0 of /data/data/com.companyname.idcardwallet/files/.__override__/Xamarin.Forms.Platform.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
[Mono] Assembly Ref addref Xamarin.Forms.Platform[0x7145c4cb00] -> mscorlib[0x715d31e280]: 33
Resolved pending breakpoint at 'Resource.designer.cs:1189,1' to void IDCardWallet.Droid.Resource.UpdateIdValues () [0x02bb7].
[Mono] Requesting loading reference 1 (of 7) of /data/data/com.companyname.idcardwallet/files/.__override__/Plugin.Media.dll
[Mono] Loading reference 1 of /data/data/com.companyname.idcardwallet/files/.__override__/Plugin.Media.dll asmctx DEFAULT, looking for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
[Mono] Assembly Ref addref Plugin.Media[0x715c75e580] -> Mono.Android[0x7145c77c00]: 21
        

MainActivity.cs

namespace IDCardWallet.Droid
{
    [Activity(Label = "IDCardWallet", 
        Icon = "@mipmap/icon", 
        Theme = "@style/MainTheme", 
        ScreenOrientation = ScreenOrientation.Portrait, 
        MainLauncher = true, 
        ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            Rg.Plugins.Popup.Popup.Init(this);  /*Must add before the other Xamarin Inits*/
            FirebaseApp.InitializeApp(Application.Context);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
            var ignore = typeof(SvgCachedImage);
            NativeMedia.Platform.Init(this, savedInstanceState);
            CrossFingerprint.SetCurrentActivityResolver(() => Platform.CurrentActivity);
            Stormlion.ImageCropper.Droid.Platform.Init();
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }

        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
        {
            Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);

            base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
        }

        protected override void OnActivityResult(int requestCode, Result resultCode, Intent intent)
        {
            if (NativeMedia.Platform.CheckCanProcessResult(requestCode, resultCode, intent))
                NativeMedia.Platform.OnActivityResult(requestCode, resultCode, intent);

            Stormlion.ImageCropper.Droid.Platform.OnActivityResult(requestCode, resultCode, intent);

            base.OnActivityResult(requestCode, resultCode, intent);
            
        }

        // plugin popup - need this to exit if your click on build-in back-button on android-mobile
        public async override void OnBackPressed()
        {
            if (Rg.Plugins.Popup.Popup.SendBackPressed(base.OnBackPressed))
            {
                await PopupNavigation.Instance.PopAsync();
            }
            else
            {
                // Do something if there are not any pages in the `PopupStack`
            }
        }

    }
}
Dan
  • 175
  • 1
  • 12
  • 1
    Could you be a little more specific about what you mean by: "No errors" but "nothing seem to be working". --> No compiler errors, but it won't compile? Code complies, but won't execute? – Barns Jun 12 '21 at 02:13
  • yes, so in compiler there are no errors. If you launch app, than it will open and but wont go to 1st page of app – Dan Jun 12 '21 at 02:16
  • seem like i will have to re-create new project, which i was avoiding – Dan Jun 12 '21 at 02:17
  • I don't know if this will help, but have a look at this SO post. One of the answers mentions the Hidden Method in you listing [setContentView is using non-SDK interface](https://stackoverflow.com/questions/52358496/setcontentview-is-using-non-sdk-interface) – Barns Jun 12 '21 at 02:22
  • Try by wrapping all code in OnCreate method to Try and Catch block and check if you are able to catch exception in Catch block. – Ranjit Jun 12 '21 at 15:42

0 Answers0