UnsatisfiedLinkError Arcgis 10.2.3 Android ArcGISRuntime.setClientId

回眸只為那壹抹淺笑 提交于 2019-12-24 00:46:31

问题


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

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

This is the stack trace:

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)

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

public static LicenseResult setClientId (String clientId)

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.

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.

Parameters

clientId. client ID to set

Returns

LicenseResult.Invalid or LicenseResult.Valid

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

Any ideas, thank you!


回答1:


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.

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.

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.




回答2:


http://maroofi.github.io/ceal/ for removing watermark from screen



来源:https://stackoverflow.com/questions/25155837/unsatisfiedlinkerror-arcgis-10-2-3-android-arcgisruntime-setclientid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!