Xamarin VS2017 CrossPlat Android target 5.1 Lollipop...Cant get right combo for error free?

meonwin7_64meonwin7_64 Member ✭✭
edited July 2018 in Xamarin.Android

Ive tried MANY combos and always have 1 to 5 errors
In this case Xamarin.Android 27.0.2.1" with Xamarin.Forms 3.0.0.550146
Change to Solution view of solution on right..... and open..... .csproj

 <ItemGroup>
    <PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Forms">
      <Version>3.0.0.550146</Version>
    </PackageReference>
  </ItemGroup>

***** Ive also changed Xamarin.Android 22.2.1.0" with Xamarin.Forms 2.5.0.280555

Also, if you right mouse on the MyProj.Android.... Properties...Setting target 5.1 Lollipop and
Min SDK 5.0.....Target SDK 5.1

Is there a correct soup of these settings that gives 0 errors for a desired Android app for 5.1 Lollipop using cross platform C# Xamarin VS2017??

Second question.... I dont see a MyProj. UWP ??? Even though I checked that check box.... I have MyProj, MyProj.Android , MyProj.IOS

Answers

  • meonwin7_64meonwin7_64 Member ✭✭

    Depending on the combo of settings... Ive seen Xamarin.Android in conflict with monoandroid 51 or monoandroid 71
    or monoandroid 81.
    Im just trying to find out the right settings to get error free android app for a 5.1 Lollipop phone.

  • meonwin7_64meonwin7_64 Member ✭✭

    It is the Xamarin Quick Start Phone Dialer Translator App example
    "xamarin/xamarin-forms/get-started/hello-xamarin-forms/quickstart?tabs=vswin"
    from docs.microsoft.com

  • robbitrobbit CNMember Xamurai

    @mronein7_64

    If I am right, you have downloaded the project, and there is something wrong when you built it?

    Can you show the error for us? And share the demo's link with us?

  • ElandaloussiishrakElandaloussiishrak USMember ✭✭

    Use android 27.0.2.1 with Xamarin.Forms 2.5.1.527436

  • meonwin7_64meonwin7_64 Member ✭✭

    Elandaloussiishrak, thank you for your help.

    Xamarin.Android 27.0.2.1 and Xamarin.Forms 2.5.1.527436
    and Min SDK 5.0 and Target Android 5.1 Api 22







    2.5.1.527436

    I briefly had a task doesnt match target, but that cleared when I reopened VS2017.

    I have 4 errors with this. ---- All 4 are NU1202 **********

    Error NU1202 Package Xamarin.Android.Support.v7.CardView 27.0.2.1 is not compatible with monoandroid51 (MonoAndroid,Version=v5.1). Package Xamarin.Android.Support.v7.CardView 27.0.2.1 supports: monoandroid81 (MonoAndroid,Version=v8.1)

  • meonwin7_64meonwin7_64 Member ✭✭

    Xamarin.Android 27.0.2.1 and Xamarin.Forms 2.5.1.527436
    and SDK Min 5.0 With Target 8.1 Oreo Api 27 ******************

    I get to one error
    Restarting VS2017 doesnt seem to clear it
    I also tried deleting /bin and /obj folders which I saw others mention

    Error Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE. Phoneword.Android

  • shubham1shubham1 Member ✭✭✭

    @meonwin7_64 said:
    Xamarin.Android 27.0.2.1 and Xamarin.Forms 2.5.1.527436
    and SDK Min 5.0 With Target 8.1 Oreo Api 27 ******************

    I get to one error
    Restarting VS2017 doesnt seem to clear it
    I also tried deleting /bin and /obj folders which I saw others mention

    Error Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE. Phoneword.Android

    Hi, There is a difference between API level and Target Version, If you giving target version Lollipop then you to select API level according to that. Like if you are using Oreo 8.1 then you will have to use API level 27.0.0.1 or above. So as for Lollipop, it will be 22 or 21 api level.

  • shubham1shubham1 Member ✭✭✭


    like this

  • meonwin7_64meonwin7_64 Member ✭✭

    Shubham1,
    Thank you for your help.

    I tried
    Xamarin.Android 22.2.1.0 Xamarin.Forms 2.0.0.6490
    SDK Min 5.0 With Target 5.1 Lollipop Api 22

    Only 1 error, but not sure how to understand it. Is there a better version of 22 or 2.0 ???

    Error The "Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName" task could not be loaded from the assembly C:\Users\m.nuget\packages\xamarin.forms\2.0.0.6490\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

  • ElandaloussiishrakElandaloussiishrak USMember ✭✭

    mono android is the version of SDK installed in your machine. if you install API 22 certainly you shouldn't use Xamarin.Android 27.0.2.1

  • meonwin7_64meonwin7_64 Member ✭✭

    Elandaloussiishrak,

    It makes sense to use api 22.
    I tried
    Xamarin.Android 22.2.1.0 Xamarin.Forms 2.0.0.6490
    SDK Min 5.0 With Target 5.1 Lollipop Api 22

    But, I still have one error as you see in the previous post. Maybe I still dont have the correct versions of 22 and Xamarin. Forms 2.0 ???

  • amaranthamaranth Member ✭✭

    There is any solution for the error: "NU1202 Пакет Xamarin.Android.Support.Design 25.4.0.2 incompatible with monoandroid51 (MonoAndroid,Version=v5.1). Пакет Xamarin.Android.Support.Design 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0)" ?

Sign In or Register to comment.