如何解决Embeddinator 4000无法生成AAR
我试图使用embeddinator 4000为Android创建一个aar库,但是每当尝试生成文件时,都会遇到多种错误。 我从这里开始遵循本教程:Getting started with Android,但我一直遇到错误,甚至尝试下载他们提供的示例,但没有任何效果。我已经在Windows的Visual Studio 2019和Mac的Visual Studio上尝试过此操作。 我不断收到的错误是:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
1> Parameter name: path1
1> at System.IO.Path.Combine(String path1,String path2)
1> at Embeddinator.Driver.CompileNDK(IEnumerable`1 files)
1> at Embeddinator.Driver.CompileNativeCode(IEnumerable`1 files)
1> at Embeddinator.Driver.CompileCode()
1> at Embeddinator.Driver.Run()
1> at Embeddinator.CLI.Main(String[] args)
只需运行:
set E4K_OUTPUT="$(SolutionDir)androidoutput"
if exist %E4K_OUTPUT% rmdir /S /Q %E4K_OUTPUT%
"$(SolutionDir)packages\Embeddinator-4000.0.4.0\tools\Embeddinator-4000.exe" "$(TargetPath)" --gen=Java --platform=Android --outdir=%E4K_OUTPUT% -c
或:
Unhandled Exception:
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Max (System.Collections.Generic.IEnumerable`1[T] source) [0x00022] in <17e8581c65f940ca8137dd67206f5dbd>:0
at Embeddinator.XamarinAndroid+<>c.<.cctor>b__4_1 () [0x00029] in <861966a3e3bd4f5cb470ae751f890033>:0
at System.Lazy`1[T].ViaFactory (System.Threading.LazyThreadSafetyMode mode) [0x00043] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at System.Lazy`1[T].ExecutionAndPublication (System.LazyHelper executionAndPublication,System.Boolean useDefaultConstructor) [0x00022] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at System.Lazy`1[T].CreateValue () [0x00074] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at System.Lazy`1[T].get_Value () [0x0000a] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at Embeddinator.XamarinAndroid.get_ApiLevel () [0x00000] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.CompileNDK (System.Collections.Generic.IEnumerable`1[T] files) [0x00115] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.CompileNativeCode (System.Collections.Generic.IEnumerable`1[T] files) [0x000ba] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.CompileCode () [0x000a6] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.Run () [0x000a5] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.CLI.Main (System.String[] args) [0x00092] in <861966a3e3bd4f5cb470ae751f890033>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Max (System.Collections.Generic.IEnumerable`1[T] source) [0x00022] in <17e8581c65f940ca8137dd67206f5dbd>:0
at Embeddinator.XamarinAndroid+<>c.<.cctor>b__4_1 () [0x00029] in <861966a3e3bd4f5cb470ae751f890033>:0
at System.Lazy`1[T].ViaFactory (System.Threading.LazyThreadSafetyMode mode) [0x00043] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at System.Lazy`1[T].ExecutionAndPublication (System.LazyHelper executionAndPublication,System.Boolean useDefaultConstructor) [0x00022] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at System.Lazy`1[T].CreateValue () [0x00074] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at System.Lazy`1[T].get_Value () [0x0000a] in <b18e5763ec3f41e68a8fe16d7f5e0bee>:0
at Embeddinator.XamarinAndroid.get_ApiLevel () [0x00000] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.CompileNDK (System.Collections.Generic.IEnumerable`1[T] files) [0x00115] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.CompileNativeCode (System.Collections.Generic.IEnumerable`1[T] files) [0x000ba] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.CompileCode () [0x000a6] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.Driver.Run () [0x000a5] in <861966a3e3bd4f5cb470ae751f890033>:0
at Embeddinator.CLI.Main (System.String[] args) [0x00092] in <861966a3e3bd4f5cb470ae751f890033>:0
在Mac上也是如此。 这是我目前正在尝试为以下项目生成aar的项目:https://github.com/Raykud/Security
注意:我确实安装了Android SDK,NDK和Mono 问题是,如何生成AAR?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。