JAR绑定库问题

时间:2016-07-14 10:10:15

标签: c# android xamarin xamarin.android

我正在尝试使用Visual Studio社区2015构建一个C#JAR库(我也在Visual Studio 2013 Professional上试过这个,但结果相同),允许我使用内置的在Mitac Android(4.2.2)设备上的IR硬件扫描仪中。我已经成功编写了一个应用程序,但这只是使用蓝牙通讯进行打印。

Mitac提供了几个JAR文件,所以我试图按照这里的绑定项目说明进行操作: https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/

我不确定我做错了什么,我不断收到错误:

Severity   Code    Description Project File    Line    Suppression State
Error       "generator.exe" exited with code -532462766.    ClassLibrary2 C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Bindings.targets 413

进一步输出:

1>  Unhandled Exception: System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
1>  Parameter name: startIndex
1>     at System.String.Substring(Int32 startIndex, Int32 length)
1>     at MonoDroid.Generation.Method.CalculateEventName(Func 2 checkNameDuplicate)
1>     at MonoDroid.Generation.InterfaceGen.GenerateEventsOrPropertiesForListener(StreamWriter sw, String indent, CodeGenerationOptions opt, ClassGen target)
1>     at MonoDroid.Generation.ClassGen.GenMethods(StreamWriter sw, String indent, CodeGenerationOptions opt)
1>     at MonoDroid.Generation.ClassGen.Generate(StreamWriter sw, String indent, CodeGenerationOptions opt, GenerationInfo gen_info)
1>     at MonoDroid.Generation.ClassGen.Generate(CodeGenerationOptions opt, GenerationInfo gen_info)
1>     at Xamarin.Android.Binder.CodeGenerator.Run(CodeGeneratorOptions options)
1>     at Xamarin.Android.Binder.CodeGenerator.Main(String[] args)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Bindings.targets(413,5): error MSB6006: "generator.exe" exited with code -532462766.

项目输出位于:output.txt

非常欢迎任何帮助或指示,谢谢!

0 个答案:

没有答案
相关问题