Xamarin应用程序缺少com.google.android.things.jar支持库

时间:2017-11-09 18:45:42

标签: java android xamarin xamarin.android iot

我正在构建一个Xamarin应用程序,我想在Android Things Raspberry Pi设备上运行。我已经通过adb进行了安装,设备已启动但应用程序logcat未显示以下内容:

  

11-09 18:38:55.653 1283 1283 E AndroidRuntime:   java.lang.UnsatisfiedLinkError中:   dalvik.system.PathClassLoader [DexPathList [[zip文件   “/system/framework/com.google.android.things.jar”,zip文件   “/oem/app/main.apk"],nativeLibraryDirectories=[/oem/lib/main,   / system / fake-libs,/ om / app / main.apk!/ lib / arababi-v7a,/ system / lib,   / system / vendor / lib,/ system / lib,/ system / vendor / lib]]]找不到   “libmonodroid.so”11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   java.lang.Runtime.loadLibrary0(Runtime.java:1011)11-09 18:38:55.653   1283 1283 E AndroidRuntime:at   java.lang.System.loadLibrary(System.java:1657)11-09 18:38:55.653   1283 1283 E AndroidRuntime:at   mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:34)   11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:22)11-09   18:38:55.653 1283 1283 E AndroidRuntime:at   android.app.ActivityThread.installProvider(ActivityThread.java:6285)   11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   android.app.ActivityThread.installContentProviders(ActivityThread.java:5851)   11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   android.app.ActivityThread.handleBindApplication(ActivityThread.java:5772)   11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   android.app.ActivityThread.-wrap1(Unknown来源:0)11-09 18:38:55.653   1283 1283 E AndroidRuntime:at   android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1661)   11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   android.os.Handler.dispatchMessage(Handler.java:105)11-09   18:38:55.653 1283 1283 E AndroidRuntime:at   android.os.Looper.loop(Looper.java:164)11-09 18:38:55.653 1283 1283   E AndroidRuntime:at   android.app.ActivityThread.main(ActivityThread.java:6541)11-09   18:38:55.653 1283 1283 E AndroidRuntime:at   java.lang.reflect.Method.invoke(Native Method)11-09 18:38:55.653   1283 1283 E AndroidRuntime:at   com.android.internal.os.Zygote $ MethodAndArgsCaller.run(Zygote.java:240)   11-09 18:38:55.653 1283 1283 E AndroidRuntime:at   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

我已经从nuget安装了Xamarin.Android.Things,但此错误仍然存​​在。

如何在Visual Studio的apk中包含此jar?

1 个答案:

答案 0 :(得分:0)

我与另一个库有类似的错误,我必须在 Droid项目选项 - >下包含所有支持的ABI Android Build - > 配置:发布调试 - > 高级

enter image description here