Android OpenTK version is greater than TargetFrameworkVersion?

So I am currently setting up my first project for monogame for both Android (v6.0) and IOS. I am using visual studio 2017 and eveything seams to run fine but I get this error.
Line Suppression State Warning: The $(TargetFrameworkVersion) for OpenTK-1.0.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
How would I go about fixing this? Or am I not developing for the correct Android version?

I don’t have any experience with Android development, but that error is pretty clear on what the issue is. You’ll need to upgrade the Android version you target to 7.1.

Apparently that doesn’t necessarily mean your game won’t run on older Android versions. Android seperates minimum version and target version. I don’t know how to set those though. Someone else around here can probably help out better than me :slight_smile:

Yea I figured that could be the problem the reason I didn’t want to is because not everyone has 7.1 yet. If I were to update would it be usable / stable on previous versions?

Yes.

From Understanding Android API Levels - Xamarin | Microsoft Learn

"Xamarin.Android exposes three Android API level project settings:

  • Target Framework – Specifies which framework to use in building your application. This API level is used at compile time by Xamarin.
  • Android.Minimum Android Version – Specifies the oldest Android version that you want your app to support. This API level is used at run time by Android.
  • Target Android Version – Specifies the version of Android that your app is intended to run on. This API level is used at run time by Android."

“[…] if the minimum Android version setting is lower than the target framework setting, your app can also run on earlier versions of Android. For example, if you set the target framework to Android 5.0 Lollipop and set the minimum Android version to Android 4.0.3 (Ice Cream Sandwich), your app can be installed on any platform from API level 15 to API level 21, inclusive.”

See the link for more information.

Oh ok I understand I thought it worked a little differently. Thanks for your help!

1 Like

This is a bug in the latest android release. If you look carefully you will see that the OpenTK.dll in the framework directory has a target framework of v7.1. Its to do with the packaging. You can ignore this error for now I think, it will be fixed in the next release.

1 Like