If you look on internet there are plenty of people reporting this error.
Xamarin is somehow aware of this error, and it marked it as fixed but it doesn’t seem like it is.
Fortunately, this exception appears only in debug mode, not in release mode.
If you look on internet there are plenty of people reporting this error.
Xamarin is somehow aware of this error, and it marked it as fixed but it doesn’t seem like it is.
Fortunately, this exception appears only in debug mode, not in release mode.
When trying to deploy on device I got this error:
Deployment failed because of an internal error: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
Deployment failed. Internal error.
To fix it, run:
C:\Users\[YourUserName]\AppData\Local\Android\android-sdk\platform-tools>adb uninstall com.xxx.yyy
Don’t include the .apk file extension
If you need to include an empty folder when deploying using MSDeploy (either manually from Visual Studio or calling msdeploy from scripts) you can do that by:
1. create a Web Publishing Pipeline file (.wpp.targets)
Create a new XML file in the project folder (the same folder that holds the .csproj or .vbproj file) and name it <projectname>.wpp.targets.
2. Add the following
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AfterAddIisSettingAndFileContentsToSourceManifest>MakeEmptyFolders</AfterAddIisSettingAndFileContentsToSourceManifest>
</PropertyGroup>
<Target Name="MakeEmptyFolders">
<Message Text="Adding empty folder to hold downloads" />
<MakeDir Directories="$(_MSDeployDirPath_FullPath)\Survey\responses"/>
</Target>
</Project>
In my case I needed an empty folder called ‘responses’ inside an existing ‘Survey’ folder.
The folder will be created no matter which configuration or publishing profile is run.
More info:
http://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx
http://blog.alanta.nl/2011/02/web-deploy-customizing-deployment.html
In my MVVMCross apps, in the shared PCL core library, I usually have a MvxViewModel derived class called ViewModelBase with a IsBusy property:
public class ViewModelBase : MvxViewModel
{
bool isBusy;
public bool IsBusy
{
get { return this.isBusy; }
set { if (this.isBusy != value) { this.isBusy = value; this.RaisePropertyChanged("IsBusy"); } }
}
// other base stuff in ViewModelBase
}
using System;
using System.ComponentModel;
using MonoTouch.ObjCRuntime;
using MonoTouch.UIKit;
using Cirrious.MvvmCross.Touch.Views;
using Cirrious.CrossCore.WeakSubscription;
using YourApp.Core.ViewModels;
namespace YourApp.Touch
{
public abstract class MvxViewControllerBase : MvxViewController
{
// weak subscription to NotifyProperty event
IDisposable npSubscription;
public override void ViewDidLoad()
{
base.ViewDidLoad();
// subscribe to view-model's PropertyChanged
this.npSubscription = ((INotifyPropertyChanged)this.ViewModel).WeakSubscribe<bool>("IsBusy", (s, e) => { this.UpdateActivityIndicatorView(); });
// at this point view-model exists, so update the indicator view
this.UpdateActivityIndicatorView();
// add other common UIViewController stuff
}
protected override void Dispose(bool disposing)
{
if (disposing && this.npSubscription != null)
{
this.npSubscription.Dispose();
this.npSubscription = null;
}
base.Dispose(disposing);
}
void UpdateActivityIndicatorView()
{
// get the activity indicator
var activityIndicatorView = (UIActivityIndicatorView)this.View.ViewWithTag(1000);
var vm = (ViewModelBase)this.ViewModel;
if (vm.IsBusy)
{
// show busy indicator. create it first if it doesn't already exists
if (activityIndicatorView == null)
{
activityIndicatorView = new UIActivityIndicatorView(this.View.Frame)
{
ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray,
Tag = 1000
};
this.Add(activityIndicatorView);
this.View.BringSubviewToFront(activityIndicatorView);
activityIndicatorView.StartAnimating();
}
// show the activity indicator
activityIndicatorView.Hidden = false;
}
else
{
// hide the activity indicator
if (activityIndicatorView != null)
{
activityIndicatorView.Hidden = true;
}
}
}
}
}
I am using the info from http://stackoverflow.com/questions/11154222/google-play-on-android-4-0-emulator#answer-11213598
1. Go to http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2 and get the latest .zip compatible with your target device.
Note the “Not compatible with x.x.x!” remarks
2. Start your emulator:
cd %LocalAppData%\Android\android-sdk\toolsemulator -avd VM_NAME_HERE -partition-size 500 -no-audio -no-boot-animThen use the following commands:
cd %LocalAppData%\Android\android-sdk\platform-tools
# Remount in rw mode
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
# Allow writing to app directory on system partition
adb shell chmod 777 /system/app
# Install following apk
adb push GoogleLoginService.apk /system/app/.
adb push GoogleServicesFramework.apk /system/app/.
adb push Phonesky.apk /system/app/. # Vending.apk in older versions
adb shell rm /system/app/SdkSetup*
public class ProductViewModel : MvxViewModel { public void Init(int productId, int clientId) { .... } }
ShowViewModel<ProductViewModel>(new { productId = pid, clientId = cid });
using Cirrious.MvvmCross.ViewModels; using Cirrious.MvvmCross.Views; using MyApp.Core.ViewModels; using Cirrious.MvvmCross.Platform; namespace MyApp.Core.Common { public static class NavigationHelper { public static void ShowProduct(int productId, int clientId) { ShowViewModel<ProductViewModel>(new { productId = productId, clientId = clientId }); } static void ShowViewModel<T>(object parameter) where T : IMvxViewModel { var viewDispatcher = Mvx.Resolve<IMvxViewDispatcher>(); var request = MvxViewModelRequest.GetDefaultRequest(typeof(T)); request.ParameterValues = ((object)parameter).ToSimplePropertyDictionary(); viewDispatcher.ShowViewModel(request); } } }
public class ViewModelBase : MvxViewModel { protected static void ShowViewModel<T>(dynamic parameter) where T : IMvxViewModel { var viewDispatcher = Mvx.Resolve<IMvxViewDispatcher>(); var request = MvxViewModelRequest.GetDefaultRequest(typeof(T)); request.ParameterValues = ((object)parameter).ToSimplePropertyDictionary(); viewDispatcher.ShowViewModel(request); } } public class ProductViewModel : ViewModelBase { public static Show(int productId, int clientId) { ShowViewModel<ProductViewModel>(new { productId = productId, clientId = clientId }); } public void Init(int productId, int clientId) { ... } }
ProductViewModel.Show(pid, cid);