Xamarin app deployment errors - c#

When I create a xamarin android blank app template and try to debug the emulator pops up, but the app itself doesn't when I close it it says I have deployment errors I changes the log to debug mode, but I can't find anything wrong (I also read running in administrator mode fixes it but it didn't work for me).
Build Output : http://pastebin.com/gEyY1TZD

Make sure your settings inside the Android Emulator have developer mode enabled and the correct adb settings too, same goes for usb if you use that in the end.
Also, if you're using Xamarin Android Player then try using the main Android AVD Manager to emulate your apps. (and vice versa).
If it still doesn't work, then try using a physical device connected via ADB to then debug the app.

I fixed this by going into that app and enabling developer mode (just like Imdad said) then going to build>>rebuild solution then clean solution. then build >> rebuild "your_app_name" then clean "your_app_name " and then finally going build deploy app. Thanks everyone for helping me out.

Related

Can I see iOS Unity debug logs on windows?

So I need to debug my unity app but I dont have a macbook with xcode to get the logs. Is there any way I can get debug Logs from my iphone on windows ? would using a virtual machine running macOS work ?
I never tried a virtual machine for my ios build but maybe this solution will suit you:
Check this case when you build and all logs appear on your Iphone.
You can use the Realtime Log functionality from the 3utools app: http://www.3u.com/tutorial/articles/146/how-to-view-the-realtime-log-of-your-idevice-using-3utools

Xamarin Won't Build on Physical Devices

I'm building a Xamarin app, and, so far, I've been able to build without issue on the iPhone Simulator, but I haven't been able to get the app to launch successfully on a physical iPhone device. In the past (about a month ago), the app was working fine on the same device. Here's some background on the specifics:
I develop my Xamarin code on my Windows machine, which is linked a remote Mac (hosted by MacStadium, a third-party hosting service).
My test phone is an iPhone 5c running iOS 10.3.3
To deploy to my iPhone, I build my app in Release mode in Visual Studio, upload the code to a third-party app installation service, Installr, which hosts the IPA file and assists with the installation of my app on the physical device. I've never had an issue with Installr and have no reason to believe that this is the source of my problem.
Since the last time the app worked on the physical device, I updated Visual Studio to version 16.3.2 and updated Xamarin. Here's the Xamarin Specs:
Generally, what happens, is that I download and install my app on the iPhone without any issue. However, when I click on the app, the splash screen loads for about 5 seconds, a white screen briefly appears as follow, then the app crashes.
I've seen several related articles on StackOverflow and other sources on the internet, but none of the proposed solutions see to work for me. For example, I've tried adding [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
to App.xaml.cs with no luck.
I've also played around with changing the CSProj file settings to compile for various combinations of ARM64 and ARMv7. Changing this didn't help either. I've tried changing the linker behavior to "Don't Link" from "Link Framework SDKs Only", and I get an error message stating that the native code is too large for 32-bit architectures. I would compile for only 64-architectures to get around this error, but I believe that the iPhone 5c uses a 32-bit architecture.
Here's what my iOS Project's CSProj file looks like currently. I've tried checking just about all of those checkboxes with no luck:
I'm stumped as to what this could be. Any suggestions would be greatly appreciated. To further complicate things, I haven't been able to get a good log file from the iPhone. Since the Mac is remotely hosted, I can't plug my phone into XCode to pull the logs that way. Does anyone have a reliable solution to get log files another way?
It looks like upgrading solved the problem. Visual Studio was updated to Visual Studio to 16.3.5 from 16.3.2. XCode on my Mac was updated to Version 11.1. After these updates, Visual Studio performed an update while connecting to the Mac remotely.

App crashes after installing a Xamarin-Forms app

I have 3 self-written apps on my phone. 2 written with Xamarin.Android and one written with Xamarin.Forms. But there is a big problem. It always work only 2 or 1 app depending on which of the 3 apps was installed last. If one of the two Xamarin.Android apps was installed last, then both Android apps work. The Forms App, however, crashes immediately. Same the other way around. If the Forms app was installed last, it works fine. The two Android apps crash immediately.
Is there any reason for that? Are the frameworks not compatible?
I had the same problem trying to install the apk from Debug folder.
Steps that worked for me:
- Disable "Use Shared Runtime"
- In Advanced Settings, Select supported architecture
Check the screenshot if not clear
If you are deploying a debug apk into the same device, with different Runtimes, when the apk is installed will remove the previous / override. So, you will need to: disable Shared Runtime, or make sure the dependencies are all the same in all the applications
If you are using visual studio then Check "Application output" with release on device.
In Application Output you can see if any exception is causing problem..

App getting crash when app start on Testflight

In versions, 1.1 and 1.2 app runs fine. I have created a new build-1.1 on Version-1.3. The app works fine in debug mode without any crash when I distributed the app to testflight my app getting crashed.
Note: I haven't Enable Device Specific Build.
I configured the provisioning profile and bundle Id correctly.
Don't know what is the issue. If anyone facing the same issue please answer the question?
It could be a lot of reasons! One way to get to the reason:
When the app crashes, it generates a crash report on the device. Connect the device after the crash to Xcode, open "Devices" window and check the devices crash reports and the console to find out what is happening.
Possible things to try:
It seems like it's a compiler issue. To verify first change the configuration to Release mode and then install the build locally to your phone. You will get to know where exactly its crashing.
Are you using the same Build Configuration (Debug/Release) while debugging on a device and the testflight app?
If not, it could be because of Optimizations being enabled, or unsupported Linker behavior in the iOS Project options.
If yes, try to upload a Debug version of the app into Testflight and retest it

Xamarin IOS app fails

New to using Xamarin with Visual Studio 2015. I have set up what I think is a very simple IOS app where it counts the number of button clicks.. I am using a MacInCloud machine as my build host. I am using an IPhone simulator.
When I build and deploy, the application sort of flashes for a moment and then goes away. It does this repeatedly. In the output window I get the following error
Launching 'NewApp.iOS' on 'iPhone 5 iOS 9.0'...
The app has been terminated.
Launch failed. The app 'NewApp.iOS' could not be launched on 'iPhone 5 iOS 9.0'. Error: An error occurred while executing MTouch. Please check the logs for more details.
The app has been terminated.
If anybody can offer me some direction with this it would be greatly appreciated.
--Jason
It has been a while since I had this specific issue. Try cleaning your project. Possibly go as far as deleting the bin/debug folder contents in your IOS project. Make sure your architecture is set to 86_64 under the build / advance tab. Make sure your MAC build client is up to date, Make sure you are building for debug. close VS and reopen. Also do a cold restart on your mac and windows machines. Don't "Reopen windows" either.

Categories

Resources