У меня проблема снова и снова. Если я создам проект в Xamarin Studio, создам его и запускаем, все работает нормально.Проект Xamarin для Android, встроенный в Xamarin Studio, построен в VS2015, но развёртывается
Затем я открываю тот же проект в VS2015, я могу его построить и никаких ошибок не показывать. Однако, если я попытаюсь запустить его (или развернуть) на устройство или эмулятор, он не работает.
Это информация Visual Studio 2015 показывает в окне вывода
1>No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2046-09-30) or after any future revocation date.
1>C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.0\zipalign.exe 4 "C:\Users\me\Desktop\work\xamarin\LocationTrackingService\LocationTrackingService\bin\Debug\com.user.learning.locationtrackingservice-Signed-Unaligned.apk" "bin\Debug\\com.user.learning.locationtrackingservice-Signed.apk"
1>C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s ENU7N16723000122 devices
1>C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s ENU7N16723000122 shell getprop ro.build.version.sdk
1>C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s ENU7N16723000122 shell getprop ro.product.cpu.abilist64
1>C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s ENU7N16723000122 shell pm dump com.user.learning.locationtrackingservice
1>The "InstallPackageAssemblies" task failed unexpectedly.
1>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.usere.learning.locationtrackingservice signatures do not match the previously installed version; ignoring!]
1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass91_0.<InstallPackage>b__0(Task`1 t)
1> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1> at System.Threading.Tasks.Task.Execute()
1> --- End of inner exception stack trace ---
1> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>d__99.MoveNext()
1>--- End of stack trace from previous location where exception was thrown ---
1> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>d__98.MoveNext()
1> --- End of inner exception stack trace ---
1> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
1> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
1> at System.Threading.Tasks.Task.Wait()
1> at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
1> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.user.learning.locationtrackingservice signatures do not match the previously installed version; ignoring!]
1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass91_0.<InstallPackage>b__0(Task`1 t)
1> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1> at System.Threading.Tasks.Task.Execute()
1> --- End of inner exception stack trace ---
1> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>d__99.MoveNext()
1>--- End of stack trace from previous location where exception was thrown ---
1> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>d__98.MoveNext()<---
1>
1>Build FAILED.
1>
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Я не знаю, почему это происходит и как решить эту проблему. Я понимаю, что проект, созданный в Xamarin Studio, можно открыть и запустить в Visual Studio и наоборот.