emgucv / emgutf

Emgu TF is a cross platform .Net wrapper for the Google Tensorflow library. Allows Tensorflow functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython.

Home Page:https://www.emgu.com/wiki/index.php/Emgu_TF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emgutf not working on MAUI Android

Cuse499 opened this issue · comments

Hi,

I'm working on porting an app of ours that uses emgucv & emgutf from Xamarin Forms to MAUI targeting Android/iOS/Windows using net7.0.

The MAUI app targeting Windows compiles and runs fine, however targeting Android is giving me some build issues that I am stuck at.

The following compilation error occurs when I include the reference Emgu.TF.Lite.runtime.android v2.8.0.1418.

1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018: The "VerifyVersionsTask" task failed unexpectedly.
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018:    at System.ThrowHelper.ThrowKeyNotFoundException()
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018:    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018:    at Xamarin.Android.Support.BuildTasks.NugetPackages.GatherProjectJsonVersions(String packageIdPrefix, String projectExtensionsPath, IEnumerable`1 excludedPackages, Version monoandroidVersion, Dictionary`2 packageVersions, TaskLoggingHelper log)
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018:    at Xamarin.Android.Support.BuildTasks.VerifyVersionsTask.Execute()
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Users\cuse499\.nuget\packages\xamarin.android.support.annotations\28.0.0.3\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(20,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I can easily reproduce this error in a new Maui project after just adding the nuget library in the following way:

<PackageReference Include="Emgu.TF.Lite.runtime.android" Version="2.8.0.1418" Condition="'$(TargetFramework)' == 'net7.0-android'" />

Could this be due to the library's dependencies (MonoAndroid / Xamarin.Android.Support.v7.AppCompat) being incompatible with net7.0-android?

Can you please advise how to proceed?

commented

The current Emgu TF release 2.10.0 (and older) do not support .NET MAUI.

We are working on the MAUI compatible release for Emgu TF (Emgu TF Lite). They will be available in the next release.

Thank you for the response. Do you have a rough idea when the next release will be available?

commented

Current estimate is about 2 months of time.