I'm testing Xamarin apps using Android emulators on Windows 10, and whenever I close (shut down) an emulated Android device, its data partition size in Android Device Manager (disk.dataPartition.Size
) is reset to a value of 6442450944
, so roughly 6.4GB(*). Whenever I want to restart an emulator, I have to edit its partition to something like 800M
, because leaving the value at 6442450944
and attempting to deploy my apps gives the following errors:
ADB0010: Unexpected install output: cmd: Can't find service: package
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A\_work\35\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.<InstallPackage>b__0(Task`1 t) in E:\A\_work\35\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753
at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
ADB0000: Deployment failed
Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Can't find service: package
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A\_work\35\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.<InstallPackage>b__0(Task`1 t) in E:\A\_work\35\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753
at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
I think resetting the partition forces the emulator to do a factory reset, which then allows the app to be deployed successfully. I have tested this with brand-new Xamarin projects as well and the same error occurs. I have reinstalled and updated my Android SDK and tools several times. Does anyone know why this is happening? How can I stop it?
(*): I think it's worth noting that this is the only property that gets changed by closing the emulator. Everything else in the default property menu remains the same as I set it.