Hello,
I am encountering an error while using the FeatureLayer with ServiceFeatureTable in my ArcGIS Runtime SDK for Android application. The error message is:
"com.esri.arcgisruntime.ArcGISRuntimeException: Geodatabase field exists.: objectid"
I am not sure what this error means or how to fix it. Here is the Kotlin code that I am using:
// create and load the service geo database
val serviceUrl =
"my_feature_service_url"
val serviceFeatureTable = ServiceFeatureTable(serviceUrl)
// create a feature layer from table
val featureLayer = FeatureLayer(serviceFeatureTable)
// add the layer to the map
mapView?.map?.operationalLayers?.add(featureLayer)
featureLayer.loadAsync()
// zoom to the layer when it's done loading
featureLayer.addDoneLoadingListener {
if (featureLayer.loadStatus == LoadStatus.LOADED) {
// set viewpoint to feature layer extent
mapView?.setViewpointAsync(Viewpoint(featureLayer.fullExtent))
} else {
featureLayer.loadError.printStackTrace()
val error = "Error loading feature layer :" + featureLayer.loadError.message
Toast.makeText(context, error, Toast.LENGTH_LONG).show()
Log.e("FeatureError", error)
}
}
I would appreciate any guidance or suggestions on how to resolve this error.
Thank you!