AnsweredAssumed Answered

Default constructor not found for type Esri.ArcGISRuntime.UI.Controls.MapView

Question asked by WMELEE on Dec 14, 2016

Hi

 

I am running VS 2015 and using ArcGIS runtime v100.0.0.0 to build an Android app. I have defined a view where the MapView is defined in.

 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/content_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Esri.ArcGISRuntime.UI.MapView
        android:id="@+id/mapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"   ..........

 

The app can be compiled and run on an android device.

When I am viewing the map and attempt to view previous fragment by pressing BACK button, I get the following exceptions:

"System.MissingMethodException: No constructor found for Esri.ArcGISRuntime.UI.Controls.MapView::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)"

"System.NotSupportedException: Unable to activate instance of type Esri.ArcGISRuntime.UI.Controls.MapView from native handle 0xffb30d9c (key_handle 0x7143f8f)."

 

The exception is originating from my main activity, "base.OnBackPressed();", statement.

 

 

Please advise.

Outcomes