UnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientId [英] UnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientId

查看:50
本文介绍了UnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Arcgis SDK for Android 时遇到了我以前从未遇到过的问题.当我调用这个方法时,它的本地接口似乎有问题:

I'm having a problem with Arcgis SDK for Android which I've never had before. It seems an issue with its native interface when I call this method:

ArcGISRuntime.setClientId

我在 onCreate()(Application 类)中有这个方法,所以它一开始就崩溃了

I have this method inside onCreate() (Application class), so it crashes at the beginning

这是堆栈跟踪:

java.lang.UnsatisfiedLinkError: nativeIsClientIdValid
at com.esri.core.runtime.LicenseImpl.nativeIsClientIdValid(Native Method)
at com.esri.core.runtime.LicenseImpl.b(Unknown Source)
at com.esri.android.runtime.ArcGISRuntime$License.b(Unknown Source)
at com.esri.android.runtime.ArcGISRuntime$License.a(Unknown Source)
at com.esri.android.runtime.ArcGISRuntime.setClientId(Unknown Source)
at com.pkg.manager.AppManager.onCreate(AppManager.java:262)

这是我在 Arcgis 文档中找到的关于此方法的内容:

And this is what I found on Arcgis documentation about this method:

public static LicenseResult setClientId (String clientId)

public static LicenseResult setClientId (String clientId)

许可应用程序使用基本功能.这将删除开发人员模式中存在的水印,并且必须在已部署的应用程序中调用.每当访问标准许可功能时,都会抛出 RuntimeException.

License an application for basic functionality. This will remove the watermark present in developer mode and must be called in a deployed application. Whenever standard licensed functionality is accessed, a RuntimeException will be thrown.

必须在使用 setLicense(LicenseInfo)setLicense(String) 设置许可证之前调用此方法.请注意,如果在调用此方法之前访问了任何标准许可功能,则在调用此方法时将引发异常,并且应用程序将保持在开发人员模式.

This method must be called before setting a license with either setLicense(LicenseInfo) or setLicense(String). Note that if any standard licensed functionality is accessed before calling this method, an exception will be thrown when this method is called and the application will remain in developer mode.

参数

客户 ID.要设置的客户端 ID

clientId. client ID to set

退货

LicenseResult.Invalid 或 LicenseResult.Valid

LicenseResult.Invalid or LicenseResult.Valid

(https://developers.arcgis.com/android/api-reference/reference/com/esri/android/runtime/ArcGISRuntime.html)

任何想法,谢谢!

推荐答案

UnsatisfiedLinkError 通常意味着应用程序无法加载它需要的本机库,即使该库的 Java 包装器存在.如果 Java 包装器也缺失,您的代码将无法编译.

UnsatisfiedLinkError normally means the application can't load a native library it needs, even though the Java wrapper for that library is present. If the Java wrapper were also missing, your code wouldn't compile.

您是否在此项目中从早期版本的 ArcGIS 切换到 ArcGIS 10.2.3?如果是这样,即使该项目具有来自新版本的 Java 库,该项目仍可能具有来自旧版 ArcGIS 的本机库,该库没有 setClientId 方法ArcGIS,它有 setClientId.

Did you switch from an earlier version of ArcGIS to ArcGIS 10.2.3 in this project? If so, it is possible that the project still has the native libraries from the old version of ArcGIS, which didn't have a setClientId method, even though the project has the Java libraries from the new version of ArcGIS, which do have setClientId.

假设您在 Eclipse 中,右键单击项目并选择ArcGIS Tools > Fix Project Properties.这应该用 10.2.3 本机库替换旧的本机库.

Assuming you're in Eclipse, right-click the project and choose ArcGIS Tools > Fix Project Properties. That should replace the old native libraries with the 10.2.3 native libraries.

这篇关于UnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆