Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin.Android does not support running the previous version while deploying solution- deploy fails

$
0
0

My Xamarin PCL project was working fine since I downloaded Android SDK Platform 27 and updated all NuGet packages.
When try to deploy solution to my device (running Android 7.1) I get this output error:

Build Failed: Xamarin.Android does not support running the previous version. Please ensure your solution builds before running or debugging it.

Build log when debugging this project:
2>Starting deploy Xiaomi Redmi 4A ...
2>Deploying Xiaomi Redmi 4A ...
2>Build started.
2>Project "MobileApp.Android.csproj" (Install target(s)):
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect.apk" "bin\Debug\\com.admir.instantcollect-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect-arm64-v8a.apk" "bin\Debug\\com.admir.instantcollect-arm64-v8a-Signed.apk"
2>"zipalign.exe" exited with code 1.
2>Done building project "MobileApp.Android.csproj" -- FAILED.
2>Build FAILED.
2>Build started.
2>Project "MobileApp.Android.csproj" (Install target(s)):
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect.apk" "bin\Debug\\com.admir.instantcollect-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect-arm64-v8a.apk" "bin\Debug\\com.admir.instantcollect-arm64-v8a-Signed.apk"
2>"zipalign.exe" exited with code 1.
2>Done building project "MobileApp.Android.csproj" -- FAILED.
2>Build FAILED.
2> 2>Deploy failed on Xiaomi Redmi 4A ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I have tried to build/clean-rebuild solution and it builds successfully. Here is the build output log:

1>------ Build started: Project: MobileApp.Android, Configuration: Debug Any CPU ------ 1> No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding </assemblyBinding> 1> MobileApp.Android -> C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\bin\Debug\mobileapp.android.dll 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> No way to resolve conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. 1> No way to resolve conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> Consider app.config remapping of assembly "mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Xml, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Core, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.5.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Runtime.Serialization, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "6.0.0.0" [C:\Program Files\IIS\Microsoft Web Deploy V3\Newtonsoft.Json.dll] to Version "11.0.0.0" [C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\packages\Newtonsoft.Json.11.0.2\lib\netstandard2.0\Newtonsoft.Json.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Xml.Linq, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.5.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2245,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding ...</assemblyBinding> ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

  • I have set the Target framework to Android 8.1 latest platform.
  • Target Android version: Use compile using SDK version.
  • Minimum Android version: Android 4.4.

I have tried to change the target platform to 7.1 but the situation gets even worse
I get the same error when using any AVD emulator.
Could anyone explain me why do i get this error, and what can I do to solve it.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>