Updating Xamarin.Forms (10) now testing on a Android 8.1 fails

Bo Vistisen 21 Reputation points
2021-01-23T12:43:38.453+00:00

I try to setup Xarmarin programming on my desktop.
I use VS2019 and my pc runs AMD Ryzen3 and Radeon
It seems as I cannot use any emulation due to some acceleratuon issues.

I then used my Samsung T580 (Android 8.1) and it worked fine.

Then I get a message to update the Xamarin.Forms - so I did.

Now I cannot do anything because I get this message:

Severity Code Description Project File Line Suppression State Error
The $(TargetFrameworkVersion) for ValidationsDemo.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0).
You need to increase the $(TargetFrameworkVersion) for ValidationsDemo.Android. ValidationsDemo.Android

Please give me some advise, can I roll back?

Thanks

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-01-25T02:51:58.623+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Severity Code Description Project File Line Suppression State Error
    The $(TargetFrameworkVersion) for ValidationsDemo.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0).
    You need to increase the $(TargetFrameworkVersion) for ValidationsDemo.Android. ValidationsDemo.Android

    Based on your error message, you should change the TargetFrameworkVersion like following screenshot(right click your projectname.Android, choose the Properties, then choose the Application tag).

    60027-image.png

    Best Regards,

    Leon Lu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bo Vistisen 21 Reputation points
    2021-01-25T10:13:11.787+00:00

    Thank you Leon Lu for your answer. So far - so good.

    And by the way: PROBLEM SOLVED.

    In this case I was trying a small demo app named: “ValidationDemo”.
    In the middle of testing I get this message from Microsoft that I need to update Xamarin.Forms. This was not my idea!

    And now that I read the Error Message again it does say that my setting for the TargetFrameworkVersion in the “App name” should be increased. Android is set for v8.1, which happens to be the Android version on my hardware testing device.

    Properties of the “App name”.Android was certainly a new feature I had never been into.
    I have been searching in Tools/Android/Android SDK Manager and the Android Device Manager.
    That must also be the place where I indirectly have chosen my TargetFrameworkVersion.

    I know the logic of the Error Message says: “Just update to a newer target device Version”, but that might not be what I want.

    In my Android SDK Manager I have Android 8.1, Android 9.0 and Android 10.0 (27, 28 and 29)
    In my Android Device Manager I had Android 9.0.
    Now I added Android 10.0. For x86 of course, as AMD processor is not possible. And when trying to start it I get the warning: “Hyper-V is not configured” which seems to be the problem that no Emulators will run on my AMD pc. I choose “Run Anyway”.

    Well, the problem might be that Xamarin.Forms has introduced a new Android version: Android 11.0 (R), “” meaning that it needs to be installed. It also now tells me that new SDK can be automatic installed by enabling Tools > Xamarin > Android Settings > Enable Auto Install Android SDKs. It is already enabled. But in the SDK Manager there is no sign of a version 11.0 !!!

    So, the only thing I can do in “App name”.Android properties where it says: Compiling using Android version (Target Framework) is selecting 10.0, even though I in my mind would like to select 8.1 that is my Target Testing device.

    To make testing very simple I change my Application to the basic Xamarin App where I only added a button to count the times I press it. My app numbers two.

    I start out with the Emulator: “Pixel 2 Q 10.0 – API 29 (Android 10 – API 29)”. These emulators have previously caused trouble from day one. Thats why I was happy testing on my hardware Tablet.

    Please take a look at this log when I try to start an Emulator:

    Time 0:00 minutes
    Starting emulator pixel_2_q_10_0_-_api_29 ...
    Build started...
    1>Waiting for runtime checks to complete
    Running non-accelerated
    C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -no-accel -avd pixel_2_q_10_0_-_api_29 -prop monodroid.avdname=pixel_2_q_10_0_-_api_29
    Emulator pixel_2_q_10_0_-_api_29 is running.
    Time 0:05 minutes Emulator displays
    Waiting for emulator to be ready...
    Time: 0:55 minutes
    Time: 2:45 minutes Pixels is starting…

    Detecting installed packages
    Detecting installed packages...
    Time: 3:30 minutes
    Time: 4:40 minutes Emulator freeze
    Time: 4:55 minutes Emulator clear
    Time: 5:02 minutes Emulator starts with day and search bar
    Time: 5:19 minutes Message Emulator isn’t responding

    Closing emulator
    Restart emulator

    1>Starting deployment to pixel_2_q_10_0_-_api_29 ...
    1>Starting emulator pixel_2_q_10_0_-_api_29 ...
    1>Running non-accelerated
    1>C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -no-accel -avd pixel_2_q_10_0_-_api_29 -prop monodroid.avdname=pixel_2_q_10_0_-_api_29
    1>Emulator pixel_2_q_10_0_-_api_29 was stopped.
    Closing it again
    There were deployment errors. Continue?
    No! Stop this nonsense!
    ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Now we will take a look at testing with the “Samsung SM-T580 (Android 8.1 – API 27)

    Everything works again. From I press Start to the application has been compiled and sent to the Tablet takes about 50 seconds.

    Mission completed. Problem solved.

    Alas the emulator does not work on my non Intel pc…

    Again, thanks for your kind response.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.