MAUI: Release build directly crashes on Android device - android

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!

Related

App stuck on splash screen when debugging- Xamarin 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.

How to Debug an App Outside of Visual Studio 2019-Pre?

I have a cross-platform app that starts and runs fine in the IDE debug mode.
However, if the app, in a debug compilation, is started from either iOS or Android starts and subsequently fails; it runs fine on UWP though. I have had the app run on them in earlier versions.
What settings/logs on those OS's should I set to try and debug the executables?
Is there any documentation for working this type of problem?
Per this conversation, John suggested "application level unhandled exception handers on each platform" which I researched, found example code here and use it to form my own code to resolve the issue I was having.

Ionic 4 - install run performed a full build and install since the installation on device does not match the local build on disk

Im trying to generate an APK to test my android build, it used to work before, i dont know what went wrong that it stopped working, whenever i try to run on device either on android studio or my own device, it does not build even though its error clean. App actually installs, but when its about to run it closes down and this message appears
Heres what i got from checking the logcat on Android Studio: https://imgur.com/a/FdE4WMo
Try uninstalling the app from the device and then run it again.
The dev / debug build uses an encryption key that's specific to the machine so I think that maybe you are trying to install a different app over the original one?

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.

Android Studio not deploying latest builds of my app

I am using Android Studio-1.0.1 with Genymotion virtual device emulator for app development.Of late,studio has started behaving erratically.
Whenever I make some changes in the layout or the java class files and deploy the application,it does not reflect the changes that I made.
I already tried to:
1.make/clean/build app
2.Uninstalled the app several times from the emulato
3.cleared genymotion cache,invalidated studio cache,and even deleted the build folder of my app to remove old builds,
but it still does not help.
Is there anything else that I can do to solve this problem,and what is its possible cause in the first place?

Categories

Resources