我使用visual studio2019,我创建了一个Android绑定库(Xamarin)解决方案,并将我的项目aar文件添加到Jars文件夹中,然后清理并构建该解决方案。成功构建并生成dll文件,但我收到有关aar文件类的一些警告,
1>"E:\xamarin apps\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
1>(GenerateBindings target) ->
1> BINDINGSGENERATOR : warning BG8604: top ancestor LoginActivity not found for nested type Com.Aarproject.LoginActivity.1.
1> BINDINGSGENERATOR : warning BG8604: top ancestor SignupActivity not found for nested type Com.Aarproject.SignupActivity.1.
1> BINDINGSGENERATOR : warning BG8604: top ancestor SplashActivity not found for nested type Com.Aarproject.SplashActivity.1.
1>
1>
1>"E:\xamarin apps\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
1>(CoreCompile target) ->
1> E:\xamarin apps\ClassLibrary1\ClassLibrary1\obj\Release\generated\src\Com.Aarproject.BuildConfig.cs(44,59,44,67): warning CS0109: The member 'BuildConfig._members' does not hide an accessible member. The new keyword is not required.
1> E:\xamarin apps\ClassLibrary1\ClassLibrary1\obj\Release\generated\src\Com.Aarproject.BuildConfig.cs(45,30,45,39): warning CS0109: The member 'BuildConfig.class_ref' does not hide an accessible member. The new keyword is not required.
1>
1> 5 Warning(s)
1> 0 Error(s)
1>
[此外,我在参考下的另一个Mobile Android App(Xamarin)中使用了dll文件,但是我无法访问我的库类(例如LoginActivity,SplashActivity ..)我如何访问它,库和Android应用解决方案都具有相同的目标版本28。
注意:aar文件项目也具有相同的版本。
te comparto mi .aar,ojala puedas ayudarme和enlacar la biblioteca de enlaces。
https://drive.google.com/open?id=1IE_z4F7QWk84jqep91tRizozf5geLGzk
saludos cordiales。