我正在尝试使用 maven 中央依赖启动基本的自适应卡示例,但由于未找到本机方法 impl 而出现错误。
我刚刚将依赖项添加到我的 build.gradle:
compile 'io.adaptivecards:adaptivecards-android-arm:1.0.0'
这是错误:
11-13 18:19:55.944 16684-16970 E/zygote: No implementation found for long com.microsoft.adaptivecards.objectmodel.AdaptiveCardObjectModelJNI.AdaptiveCard_DeserializeFromString(java.lang.String) (tried Java_com_microsoft_adaptivecards_objectmodel_AdaptiveCardObjectModelJNI_AdaptiveCard_1DeserializeFromString and Java_com_microsoft_adaptivecards_objectmodel_AdaptiveCardObjectModelJNI_AdaptiveCard_1DeserializeFromString__Ljava_lang_String_2)
11-13 18:19:55.945 16684-16684 D/AndroidRuntime: Shutting down VM
11-13 18:19:55.949 16684-16684 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tuenti.messenger, PID: 16684
java.lang.UnsatisfiedLinkError: No implementation found for long com.microsoft.adaptivecards.objectmodel.AdaptiveCardObjectModelJNI.AdaptiveCard_DeserializeFromString(java.lang.String) (tried Java_com_microsoft_adaptivecards_objectmodel_AdaptiveCardObjectModelJNI_AdaptiveCard_1DeserializeFromString and Java_com_microsoft_adaptivecards_objectmodel_AdaptiveCardObjectModelJNI_AdaptiveCard_1DeserializeFromString__Ljava_lang_String_2)
at com.microsoft.adaptivecards.objectmodel.AdaptiveCardObjectModelJNI.AdaptiveCard_DeserializeFromString(Native Method)
at com.microsoft.adaptivecards.objectmodel.AdaptiveCard.DeserializeFromString(AdaptiveCard.java:105)
我检查了生成的 APK,它包含自适应卡的 SO,但仍然无法正常工作。