【问题标题】:UnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientIdUnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientId
【发布时间】:2014-09-29 02:52:57
【问题描述】:

我在使用 Arcgis SDK for Android 时遇到了以前从未遇到过的问题。 当我调用此方法时,它的本机接口似乎存在问题:

ArcGISRuntime.setClientId

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

这是堆栈跟踪:

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 文档中找到的关于此方法的内容:

public static LicenseResult setClientId(String clientId)

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

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

参数

客户 ID。要设置的客户 ID

返回

LicenseResult.Invalid 或 LicenseResult.Valid

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

任何想法,谢谢!

【问题讨论】:

    标签: android arcgis unsatisfiedlinkerror


    【解决方案1】:

    http://maroofi.github.io/ceal/ 用于去除屏幕上的水印

    【讨论】:

    • 欢迎来到 Stack Overflow!虽然这可能会回答问题,但it would be preferable 在此处包含答案的基本部分,并提供链接以供参考。
    【解决方案2】:

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

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

    假设您在 Eclipse 中,右键单击项目并选择 ArcGIS 工具 > 修复项目属性。那应该用 10.2.3 本机库替换旧的本机库。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-04
      • 1970-01-01
      • 2016-05-12
      • 2012-07-21
      • 1970-01-01
      • 2019-08-02
      相关资源
      最近更新 更多