I have this project and I have had some issues with it when I try to debug it as android. I have come up with a solution but only if I use a earlier version of xamarin forms (1.3) in the androidpackage.
When I search for Xamarin forms on my other projects in my NuGet gallery I can see both 1.3 and 2.0 versions and add it as a package.
But in this partcular project where I need the 1.3 version I can only see the 2.0 version.
If you use the NuGet package manager either from a command line or the Visual Studio Package Manager window you can specify which version you want to install.
From command line:
nuget install Xamarin.Forms -Version 1.3.5.6337
From VS Package Manager window:
Install-Package Xamarin.Forms -Version 1.3.5.6337
Alternatively you can create a package.config for each project folder and add the following lines to it:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Forms" version="1.3.5.6337" targetFramework="<your target framework>" />
</packages>
Then after adding this restore NuGet packages for your project.
The <your target framework>
will depend on which project type you want to install it into.
There is no nuget "Package Manager" on Mac or Linux as it is implemented via PowerShell and that does not exist on Mac/Linux in a form that will work (There is the OSS PASH project but it does not provide enough functionality for Nuget's Package Manager).
Manually edit your package.config
with the versions that you need as the other answer says and do a restore on it.
package.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Android.Support.Design" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v4" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Forms" version="2.0.0.6490" targetFramework="MonoAndroid60" />
</packages>
package.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Android.Support.Design" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v4" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.0.1.3" targetFramework="MonoAndroid60" />
<package id="Xamarin.Forms" version="1.3.5.6335" targetFramework="MonoAndroid60" />
</packages>
Right-click on the Packages
in the Solution Pad and perform a Restore
Note: Xamarin installs a shell wrapper for nuget.exe
and it is called nuget
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.