So I was playing with Xamarin for 2 weeks. I was able to build and run the project on my Android device.
Today I tried the release mode and built an APK and signed it. Everything was fine until that. After I built and installed the APK to my Android device, deployment started to fail. It builds successfully but it can't deploy it on my Android device. It's worth noting that I chose the debug mode.
The funny thing is, it deploys to a virtual device but not to my physical device. I tried cleaning and rebuilding the project and it did not fix the problem.
Uninstall any previously deployed .apk from your phone , that could potentially be signed with a different keystore and then try to build again
Related
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.
I have an existing android application which is written in Xamarin Android. when I Adhoc distribute the APK I am able to install the APK on an emulator. However when I try to install the apk on a device I get the following error
Starts installing and then Application cannot be installed. USB debugging enabled and allow application from unknown sources is enabled.
My project properties look like this
Package signing is blank i.e, default
When I do build acrhive and save the apk. I can take the apk and run on an emulator on a different machine however when i try to install the apk on a device it fails with error 'Application not installed'
I am really new to this guys, any help is greatly appreciated. I bet i am missing something simple.
You should sign your APK. Unsigned APK cannot be installed on the real device. Check here how to sign Xamarin Android app.
I figured it out guys. You have to go into play store settings and click play protect and settings. Disable the slider and the app installs.
Our company has a native iOS app that was built in Xamarin/Visual Studio. We originally uploaded it to the App Store a few years ago and have made a few changes to it over the years.
The app itself is very basic. It's basically just a web view that navigates to a Single Page Application. There is very little native app code in the project.
Every week or so I regular launch the native app on our company iPad. Instead of running a version pulled down from the App Store, I periodically rebuild and upload the app from a Mac Mini running Visual Studio and/or debug it directly from the Mac Mini through Visual Studio.
A few days ago I tried launching the native app and after opening it immediately closed. I tried rebooting the iPad but the app still minimizes/closes immediately after opening. If I double-tab the Home button on the iPad, I can see the app still running in the background, but any time I tap on it it immediately minimizes itself.
I tried Cleaning and Rebuilding the native app solution in Visual Studio and re-uploading it to the iPad and that didn't fix it. I updated Visual Studio (and all of its packages) on the Mac Mini, updated XCode, updated Mac OS, updated iOS on the iPad, and nothing resolved the issue.
When I attempt to debug the app from Visual Studio, it shows two error codes in the Output window: MT1043 and MT1007. The debugger always fails to attach to the app as well.
I've tried Googling the error codes and the problem itself and haven't found anything that has worked. I've tried generating a new Development Certificate and Provisioning Profile to use to sign the app when uploading it to the iPad but that didn't work either.
What's strange is that if I download the app off of the App Store it works just fine. The source code that I'm attempting to build/run right now is identical to what it was at the time it was deployed to the app store. What else is strange is that, if I spin up an iOS Emulator and upload/debug against that, the app works just fine.
I tried using a different iPad and it had the same issue. The app minimizes itself immediately after attempting to launch it.
Found the answer. Had to set the system certificate trust from "Always Trust" to "Use System Default". Same solution as provided here: https://stackoverflow.com/a/52506186/9704484
TOOLS:
Windows 10 Pro
Visual Studio 2017 Pro
I created a VB.NET windows app GUI on my desktop computer,
published it,
copied the publish\ directory to a new target laptop,
logged into laptop and ran publish > setup.exe
it asked me to "install" and I said YES,
and app started, but hung, never displaying the GUI.
My app has two .DLL's of mine, but they are not in the publish\ directory.
I made a HELLO WORLD on original desktop, published, and it ran ok at laptop.
All of your dlls need to be distributed with your application.
Try manually move your dlls in the same folder of .exe file on target machine: if it works simply rebuild your setup incuding these dlls as dependencies.
The problem is solved. The target laptop needed installation of drivers from a vendor of some 3rd party middleware used in the app.
So, the packaging software wasn't smart enough to tell me the problem, and its error correction response was to just end without any error message.
I've been trying to setup mobile development on VS2015 for several days. The issue is
I created blank app
Started Emulator From Xamarin Android Player
Started Debugging
I got my solution built succeed but deploy failed. Here is image
I checked the error list but as we can see it is nothing there.
Well, I searched on internet with different queries and came to know that this problem is quite common but no permanent solution is provided. Some of the solutions suggested on other sites including Xamarin Official Forums are as follows:
Restart debugger.
Install valid Java Sdk Manager.
Restart Visual Studio.
Install android packages for targeted platform.
Create virtual device.
Change settings in Hyper-V manager.
Set your project as Startup Project.
Uninstall android components and reinstall them.
Disable Fast Deployment Option in Project Properties.
I tried everything but issue stands still. The packages I have installed for SDK are in image as follows
I don't know what part of package installation I am missing or there is some problem with VS2015. I have been trying to resolve this deployment issue but in vain.
Note*: I am using HP EliteBook 8460p with Win 10 64-bit installed on it.