I'm building the sample intro xamarin forms app With Visual studio 2019 and the emulator boots up but the app doesn't deploy with the error Unexpected install output: cmd: Can't find service: package":
1>No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1>C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.9\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\sticker592\AppData\Local\Xamarin\Mono for Android\debug.keystore" 1>C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\zipalign.exe -p 4 "C:\Users\sticker592\Downloads\FirstApp\AwesomeApp\AwesomeApp.Android\obj\Debug\81\android\bin\com.companyname.AwesomeApp.apk" "bin\Debug\\com.companyname.AwesomeApp-Signed.apk" 1>C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.9\bin\java.exe -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\lib\apksigner.jar" sign --ks "C:\Users\sticker592\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 21 --max-sdk-version 27 C:\Users\sticker592\Downloads\FirstApp\AwesomeApp\AwesomeApp.Android\bin\Debug\com.companyname.AwesomeApp-Signed.apk 1>ADB0000: Deployment failed 1>Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Can't find service: package 1> 1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345 1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.<InstallPackage>b__0(Task`1 t) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753 1> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() 1> at System.Threading.Tasks.Task.Execute() 1>ADB0010: Unexpected install output: cmd: Can't find service: package 1> 1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345 1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.<InstallPackage>b__0(Task`1 t) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753 1> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() 1> at System.Threading.Tasks.Task.Execute() 1>Done building project "AwesomeApp.Android.csproj" -- FAILED. 1>Build FAILED.
In my case it helped to do a Factory Reset of the emulation device in the Android Device Manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With