App stuck on splash screen when debugging- Xamarin Android - android

I've got a project that has been written by someone else, and I can't debug it using Visual Studio 2019.
It's a Xamarin app. When I try to debug it in VS, using the emulator or a phone, it gets stuck on the splash screen. Sometimes it returns a failed to load XAML hot reload and a timeout.
When I open the app without the debugger, using the emulator, the app works.
Any ideas on what is the problem here? Already tried various project configurations.
Edit: other xamarin projects are working with the debug, using the same configs.

Related

MAUI: Release build directly crashes on Android device

I built a .NET MAUI project and want to install this on my local device (Android 9). When i start directly out of VisualStudio as Debug build everything works well. When i change build type to Release, the splash screen is visible for a second and after that, the app closed directly.
I have no clue what the problem is. Is there an opportunity to debug release build or have a log view, why the app crashes instantly?
Thank you and best regards!

Flutter app stuck at installing with white screen

My flutter app is always getting stuck in installing when I run on my device Lenovo L18021, app is launched with the white screen and it is not moving past that, I am not running a custom app, I am just running the demo app comes as default, I tried changing package name of the app and used flutter clean multiple times, I used File->Invalidate cache and Restart option multiple times in android studio, I found that I am receiving an untrusted app message in the logcat, I do not know if that is the issue, I also increased the buffer size on my device, and the app is launching fine in the web and from my android studio the native android apps are launching on that device correctly, only the flutter apps are not launching, that too while launching from the android studio only. If I opened the installed app in my phone later the app is running correctly, I even did a factory reset on my device then tried to run the app from android studio, still it is not working, "flutter doctor -v" is not showing any errors, I have been stuck with this issue for the past two weeks kindly help me to resolve this issue ?
My screenshots
launch screen
Flutter doctor -v
Logcat
Device screenshot
Didn’t you accidentally create two different MainActivity files, with different project name. If so delete one.
android/app/src/main/kotlin/com/YOUR_PROJECT/MainActivity.kt

Xamarin cross platform - Couldn't connect debugger

After installing everything it couldn't create emulator. Running emulator from android studio. Using a Hello world Xamarin app. It installs on the emulator successfully but stops after showing a white screen. Then closes automatically showing this error:
Couldn't connect debugger. You can see more details in Xamarin Diagnostic output and the full exception on logs.
Manually opening the app also fails to show second time but opeing it third time shows the UI that has only a label and a button.
Third time it works. Also closed android studio so that theres no conflict on debugger.
Now what is wrong here?
Clean and Rebuild the Solution Is working fine for me, also in some cases you need to uninstall the app from Device.
I got the same problem after updating Android Sdk from Android Studio, then Visual Studio showed that error. A restart will help.
I hope this should mainly because of the device connectivity, so I change the cable and the issue was solved. 😀
Doing a factory reset on my emulator device via Android Device Manager fixed this for me.

Xamarin no longer debugging my app

I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.

trouble debugging and running sample android project

I installed the Android 2.2 SDK (2.2 is the version i have on my smartphone). I've tried running the NotePad sample project as an Android project. Here is what happens: the emulator loads, but when I click on the app, the screen goes blank. There are no errors being thrown. Has anyone else run into this problem? If so, how have you fixed it?
When you press run, the emulator loads AND the application should automatically open and run. Also, make sure there are no errors with the code itself.
If all else fails, try a new/ different SDK and make sure the app has no errors during it's installation into the SDK. Look at the Console and LogCat to make sure that there are no errors the emulator runs.

Categories

Resources