How to Deploy Android Apps Using Xamarin Studio? - c#

I have created a demo apps Hello Android From Xamarin Studio It's Not Deploy when i Run.
in demo tutorial it's running fine and then it's deploy means that it's install first time and then we can use but in my created demo it is not install. please any one resolve my problem. why it is not work?
Please look below link for more details About Error:
http://forums.xamarin.com/discussion/6994/after-the-emulator-starts-up-and-slide-the-lock-button-my-apps-not-installed-means-it-s-not-display?new=1

I had that problem too, it was resolved when i update my hard disc to ssd. Try to open the emulator first, and then run the demo app.

Related

can only debug not deploy xamarin app with System.Data.SqlClient class used

I'm working on an android app in Xamarin. It will debug in VS2013 community absolutely fine, deploying it to my phone on a usb tether. However I try and deploy a full .pk file set for a website download (I know the user would have to agree to installing 'untrusted apps') after I go through a standard deployment via VS2013, I try a 'dry' installation via download from a site, this doesn't work. It starts fine, and runs up until an sql-command is executed (namely logging in). Not sure how to resolve this one. Any help would be great.
So after some research the answer is simply to turn on 'west' as an option in project properties.
If this fails however this is a bug, and due to be fixed in 4.3 ? (apparently)
more information: http://forums.xamarin.com/discussion/25/problem-inserting-data-in-sql-server-in-release-mode

Visual Studio - Registration of the app failed after uninstalling app

I am developing a Universal Windows 10 app and I get an annoying problem every time I try to run project after I uninstall the app from windows start menu. The scenario is:
I run project on local machine - app is running good;
I press Shift+F5 to stop runing;
Go to Windows start menu and uninstall just installed app;
Run app again from Visual Studio;
Get error 1>Error : DEP0700 : Registration of the app failed. An internal error occurred with error 0x80073D05. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues. (0x80073cf6)
NOTE: sometimes Clean Solution + Rebuild Solution helps, but sometimes only system restart solves the problem. Is this an official bug or I am missing something?
I was facing the similar problem, and as per this link
https://social.msdn.microsoft.com/Forums/en-US/566e53ec-2020-4969-9f17-f0a5a916f027/error-dep0700-registration-of-the-app-failed?forum=winappswithcsharp
we need to locate the app`s package in C:\Users\UserName\AppData\Local\Packages and delete it. This error occurs when after installing if the system is not able to delete the complete package from Local.
This is not the official bug in this case.
Please check if your project is build before and then deployed (please see screenshots below) and let me know whether problem remains and what is the version of the Windows platfrom you use.
You can check it using search window and type "winver":

Can't create app packages Universal Apps

I wanted to load my universal windows app into the app store. So i create my app packages. The problem was now, that i got a few build errors that the namespace of my custom control cannot be found. This is interesting because I can start my app in debug and release mode on my computer and on my mobile.
I hope you know what my problem is and you can help me.

Xamarin - Android - Visual Studio - The application could not be started

I was working on an Android project using Xamarin in Visual Studio 2012. I recently upgraded from an HDD to a SSD so I reinstalled Windows and all of my programs.
After cloning my git repository and trying to run the application on my device, I have not been able to get it to run. I was able to start a new hello world project and I got that to run, but I can't get this project to run.
This is what the error says:
The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.
I have searched for a solution to this issue but have been unable to find anything that worked.
I solved the issue. Somehow the application still existed on my device even though it did not show up in my applications and I needed to remove it.
The solution was to find an old APK that I had emailed and I installed that. Then I uninstalled the application and deployed it again from Visual Studio. This time it worked.
You can read more here: https://forums.xamarin.com/discussion/8501/install-failed-update-incompatible
EDIT (March 13th, 2017):
Seems a lot of people found this answer useful so I decided I should update it with an alternate method to uninstall the app if you don't have access to an old version.
As Atul Chaudhary and Nestel mentioned, you can open up your adb command prompt and run adb uninstall <com.your.application.package.name>. If there are any remnants of your application which remain this should get rid of them.
Renamed Application name.
Added Package name.
App. started working on Emulator, Renamed application again, app. continued to run.
Note: Resetting device, un-installing the app. and related runtime etc. from settings did not work for me.
Hope this helps someone.
Running this command from the adb shell solved it for me:
adb shell pm uninstall -k com.packagename
To access the adb shell from Visual Studio Tools -> Android -> Android Adb Command Prompt.
Very interesting error, seems like Visual Studio is unable to unistall the previous version completely.
Obviously the OP figured out the issue to their problem but I still wanted to post an answer relating to an issue I had with the same error message. I am using Visual Studio (within Parallels) and attempting to debug the app on a Xamarin Android Player instance (which is running on my Mac).
I kept getting this error and realized that a different, more helpful, error message was showing up in the Build Output saying that I was not supporting the correct architecture.
Heading into the Android Project Properties -> Android Options -> Advanced -> and checking x86 finally allowed my to successfully deploy to the Xamarin Android Player.
The ADB approach does not worked for me.
I did not want to factory reset my phone nor uninstall my apps so I have managed to deploy by changing the package.
Right click on your Droid project
Select Properties
Got to Application Manifest
Change the Package name
Re-deploy your project
Hope this helps
I had the same error today, trying to run Xamarin Android-app on Xamarin Android Player. To fix it I needed to check the "x86" box at the "Supported architectures" section. So you might want check this section.
I experienced this problem when there was not sufficient memory on device. After "successful" deployment the app was missing even from the app list in Settings. Deleting through adb gave me Failure which indicated it was not installed. In Output log in VS2015 I was having the same message as OP. Finally it worked after I cleaned up about 50-100 MB, even though in App Settings it showed me that there were 500 MB free. I tried different solutions (deleting through adb, cleaning, building then deploying) but only cleaning up worked.
adb uninstall did the trick. The strange thing is that even if you run the command to list all app that are installed it will not show up but if you run the uninstall command with ur package name which should be ur project name or name that you have assigned you will get the success result which means it got uninstalled and to check that if run the uninstall command again with same package name u will get failure command. Then deploying ur package again should work
In my case issue was two activities were Launcher activities,so I made one of them Launcher activity.
You can remove
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> from AndroidManifest.xml file or
MainLauncher = true from .cs Activity file attribute
If you've reinstalled everything you may have to set the configuration manager back up in VS.
In Visual Studio: Build -> Configuration Manager -> Put a check in the "Deploy" box.
I've managed to solve it by wiping user data from emulator.
From AVD Manager, when you start the emulator, check "Wipe user data" and your emulated device will behave like new.
Problem itself appeared after updating to Android SDK Tools 25.1.3.
I could not get this working, initially. Tried removing everything (Mono runtime, app, etc.), but to no avail.
What did work was renaming my package, which was fine in my case since I haven't release my apk yet. Some ghost version is obviously still stored on my unit.
Renaming Application Name and Package Name (go to Manifest settings) where helped to resolve this issue
The only alternatives which help me solve this were the following:
From the Xamarin Android Studio home page (where all devices are displayed), click on the "three-dots" button and then Factory Reset.
OR
Install a new device and deploy your app there.
Whenever I encounter this problem, I publish the app and install in manually using
adb install "<path to apk file>"
in the Android Adb Command Prompt.
Hopefully, a fix is out soon, according to
https://github.com/xamarin/xamarin-android/issues/3727
Happened to me today, after updating a project from Git and running in Android Emulator. Uninstalling the app from emulator, performing Clean and Rebuild in VS and instaling the application again helped.

Can't open WP7 solution with VS 2010 Express

I've downloaded a zipped project from https://github.com/slodge/face. This project is a wp7 realization for face.com api. I've just started studying silverlight and wp7 applications, so I'm not strong at it. The problem is that I can't load this solution. The error message is "One or more projects in the solution were not loaded correctly. Please see the output window for details"
What do i have to do?
I just opened solution and it works ok. I think you have problem with your environment.
From errors you see it appears you have no SDK 7.1
Please download and install.
Since it's my github account... :)
This project is just a 7.1 (Mango) project - so it should load for you.
If it doesn't then please do check the output window for more help.
If it still doesn't then the project itself is quite simple - the main code is in the faceapi class - and should be simple enough to use even without a project file. If you need any more help with it, then email me (see my so profile for email address) or contact me via twitter #slodge
To get the app running you will need your own API key from Face - see https://github.com/slodge/face/blob/master/SmilieHappy/Helpers/FaceApiSecrets.txt
Also, the team at face.com seemed very helpful when I contacted them!
Stuart
I also encountered same issue like yours. Some project can open correctly and somes are not. The issue is because the tag is only support "WindowsPhone" other than "WindowsPhone71".
So the solution is clear, manually edit the ".csproj" file. Change the "WindowsPhone71" to "WindowsPhone".
This issue does because symbols related to the windows phone framework (7.1 or 8.0) are missing. I think why I meet this issue is due because I install SDK7.1 on Windows Server 2008 R2 (which sdk not support) through "Web" way.
Here is the link how I install the SDK.
How to install the Windows Phone Developer Tools on Windows Server 2008

Categories