Xamarin.android Xamarin中的Android.aar绑定库

Xamarin.android Xamarin中的Android.aar绑定库,xamarin.android,Xamarin.android,我有一个.aar库,我正试图在Xamarin中使用它。大多数组件工作正常,但完全缺少一个接口 在绑定库内置调试中,我发现了以下内容 1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewFragment._1. 1>BINDINGSGENERATOR : warnin

我有一个.aar库,我正试图在Xamarin中使用它。大多数组件工作正常,但完全缺少一个接口 在绑定库内置调试中,我发现了以下内容

1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewFragment._1.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewFragment._2.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewFragment._3.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewFragment.ICameraCallback.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewFragment.CameraOrientationDetector.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewRfFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewRfFragment._1.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewRfFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewRfFragment._2.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewRfFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewRfFragment._3.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewRfFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewRfFragment.ICameraCallback.
1>BINDINGSGENERATOR : warning BG8604: top ancestor FaceViewRfFragment not found for nested type Com.Truesen.Face.Entrance.Fragment.FaceViewRfFragment.CameraOrientationDetector.
ICameraCallback是我需要的接口,如何才能正确生成接口?或者如何手动添加

这是我正在使用的.aar文件的链接

内部库依赖于
androidx.fragment
androidx.annotation
,请确保您也将其作为绑定项目的参考添加(包位于nuget上)。它们可能丢失,因此无法创建正确的绑定。 对于android绑定,确保java项目/库中的所有依赖项也添加到xamarin绑定项目和最终项目中是很重要的。这应该让编译器找到所有正确的引用,并正确地进行绑定

查看绑定是否正确完成的一个好方法是检查最终项目,在VisualStudio中打开对绑定(.dll)的引用,并查看有哪些类和方法可用。这应该类似于.aar项目中的类和方法


如果不是这样,请首先检查绑定是否缺少引用,下一个选项是使用
add node
标记手动将缺少的类/方法等添加到绑定中。

关于使用绑定库中的接口,您可以看一看:我了解接口的使用,但问题是,在构建绑定库时,接口不会生成。这个接口IOnTempListener在同一个.aar库中生成并运行良好。我下载你的.aar文件,接口在classes.jar文件中?这是正确的,com.truesen.face.entry.fragment.FaceViewFragment.CameraCallback