Help wrapping third party jar for Mono for Android

2»

Posts

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    Good question. I typically like to use the parent class as my handler for these listeners so that I don't have to create anonymous classes or nested classes. However, when assigning a handler for an ESRI map listener, it must extend from Java.Lang.Object. Since your parent class is most likely extending something else and you cannot extend from multiple things, I do have to create a nested class just to be the handler for these listeners. But I then just forward the listener events back up to my parent class. Below is an example of my nested helper class that I use to create an instance and assign as the listener. You can see that I pass in the parent class in the constructor of this helper class so that I can forward the events back up. Sometimes I pass up arguments to the parent and sometimes I don't. It just depends on your needs. Also, notice that the helper class implements the interface for each listener that it is a handler for. This allows you to use the same helper class to be a handler for multiple listeners. Here is the code that I use to construct my map and assign my helper as the handler for multiple listeners.

    DroidMapServiceCallbackHelper callbackHelper = new DroidMapServiceCallbackHelper (this);
    var activity = _topActivityLocator.GetCurrentTopActivity ();
    _mapV = new MapView (activity);
    _mapV.EnableWrapAround(true);
    _mapV.SetEsriLogoVisible (true);
    _mapV.OnStatusChangedListener = callbackHelper;
    _mapV.OnPanListener = callbackHelper;
    _mapV.OnZoomListener = callbackHelper;
    _mapV.OnSingleTapListener = callbackHelper;
    

    Here is the helper class:

    //Helper class since map service can't inherit both from Java.Lang.Object and abstract base class
    private class DroidMapServiceCallbackHelper : Java.Lang.Object,IOnStatusChangedListener,IOnSingleTapListener,IOnPanListener,IOnZoomListener
    {
        private DroidMapService _mapService = null;
    
        public DroidMapServiceCallbackHelper(DroidMapService mapService)
        {
            _mapService = mapService;
        }
    
        public void OnStatusChanged (Java.Lang.Object source, OnStatusChangedListenerSTATUS status)
        {
            _mapService.OnStatusChanged (source,status);
        }
    
        public void OnSingleTap (float x, float y)
        {
            _mapService.OnSingleTap (x, y);
        }
    
        public void PostPointerMove (float p0, float p1, float p2, float p3)
        {
            //Do nothing
        }
    
        public void PostPointerUp (float p0, float p1, float p2, float p3)
        {
            _mapService.MapDidPan ();
        }
    
        public void PrePointerMove (float p0, float p1, float p2, float p3)
        {
            //Do nothing
        }
    
        public void PrePointerUp (float p0, float p1, float p2, float p3)
        {
            //Do nothing
        }
    
        public void PostAction (float p0, float p1, double p2)
        {
            _mapService.MapDidZoom ();
        }
    
        public void PreAction (float p0, float p1, double p2)
        {
            //Do nothing
        }
    }
    
  • g.papadakisg.papadakis GRMember ✭✭

    Great answer thanks!!!!!!!

  • g.papadakisg.papadakis GRMember ✭✭
    edited July 2014

    hi once again,

    Now i am trying to load a local Geodatabase file (data.geodatabase)
    var localGdb = new Geodatabase(path);

    and an exception occurs in Com.Esri.Core.Geodatabase
    JNIEnv.FinishCreateInstance (Handle, class_ref, id_ctor_Ljava_lang_String_, new JValue (native_p0));

    i checked the path and the file is already there. Can anyone give a help?

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    Can you post the section of the logcat surrounding the time when you get this error?

  • g.papadakisg.papadakis GRMember ✭✭
    edited July 2014

    W/dalvikvm( 8690): in Lhermobileapp/MapFragment;.n_onActivityCreate
    d:(Landroid/os/Bundle;)V (GetMethodID)
    W/dalvikvm( 8690): Pending exception is:
    E/dalvikvm( 8690): VM aborting
    E/mono-rt ( 8690): Stacktrace:
    E/mono-rt ( 8690):
    E/mono-rt ( 8690): at <0xffffffff>
    E/mono-rt ( 8690): at (wrapper managed-to-native) object.wrapper_native_0x416b
    313d (intptr,intptr,string,string)
    E/mono-rt ( 8690): at (wrapper delegate-invoke) .invoke_intptr__this__
    _intptr_intptr_string_string (intptr,intptr,string,string)
    E/mono-rt ( 8690): at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string
    ) [0x00042] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/b
    5dc5ce9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:157
    E/mono-rt ( 8690): at Java.Lang.Throwable.get_Message () [0x00014] in /Users/b
    uilder/data/lanes/monodroid-mlion-monodroid-4.12-series/b5dc5ce9/source/monodroi
    d/src/Mono.Android/platforms/android-16/src/generated/Java.Lang.Throwable.cs:231

    E/mono-rt ( 8690): at (wrapper runtime-invoke) .runtime_invoke_object_
    _this__ (object,intptr,intptr,intptr)
    E/mono-rt ( 8690): at <0xffffffff>
    E/mono-rt ( 8690): at (wrapper dynamic-method) object.20fbf4e7-d612-4521-9c0e-
    5e7244fa02f8 (intptr,intptr,intptr)
    E/mono-rt ( 8690): at (wrapper native-to-managed) object.20fbf4e7-d612-4521-9c
    0e-5e7244fa02f8 (intptr,intptr,intptr)
    E/mono-rt ( 8690):
    E/mono-rt ( 8690):
    E/mono-rt ( 8690): Got a SIGABRT while executing native code. This usually indic
    ates
    E/mono-rt ( 8690): a fatal error in the mono runtime or one of the native librar
    ies
    E/mono-rt ( 8690): used by your application.
    E/mono-rt ( 8690):
    E/mono-rt ( 8690):
    W/MonoDroid-Debugger( 8717): Trying to initialize the debugger with options: --d
    ebugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8931,server=y,emb
    edding=1
    W/MonoDroid-Debugger( 8717): Accepted stdout connection: -1
    F/MonoDroid-Debugger( 8717): Error accepting stdout and stderr (127.0.0.1:8932):
    Address already in use
    W/MonoDroid-Debugger( 8732): Trying to initialize the debugger with options: --d
    ebugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8931,server=y,emb
    edding=1
    W/MonoDroid-Debugger( 8732): Accepted stdout connection: -1
    F/MonoDroid-Debugger( 8732): Error accepting stdout and stderr (127.0.0.1:8932):
    Address already in use

  • g.papadakisg.papadakis GRMember ✭✭

    I am attaching also the geodatabase....

  • g.papadakisg.papadakis GRMember ✭✭
    edited July 2014

    A more detailed log

    I/ActivityManager( 461): START u0 {act=android.intent.action.MAIN cat=[android.
    intent.category.LAUNCHER] flg=0x10000000 cmp=HerMobileApp.HerMobileApp/hermobile
    app.MapEditActivity} from pid 25199
    I/ActivityManager( 461): Start proc HerMobileApp.HerMobileApp for activity HerM
    obileApp.HerMobileApp/hermobileapp.MapEditActivity: pid=25210 uid=10133 gids={50
    133, 3003, 1028, 1015}
    W/MonoDroid-Debugger(25210): Trying to initialize the debugger with options: --d
    ebugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8939,server=y,emb
    edding=1
    W/MonoDroid-Debugger(25210): Accepted stdout connection: 44
    W/libc (25210): WARNING: generic atexit() called from legacy shared library
    W/monodroid-gc(25210): GREF GC Threshold: 46800
    W/Mono (25210): The request to load the assembly mscorlib v2.0.5.0 was remapp
    ed to v2.0.0.0
    W/Mono (25210): The request to load the assembly mscorlib v2.0.5.0 was remapp
    ed to v2.0.0.0
    W/Mono (25210): The request to load the assembly System.Core v2.0.5.0 was rem
    apped to v3.5.0.0
    W/Mono (25210): The request to load the assembly mscorlib v2.0.5.0 was remapp
    ed to v2.0.0.0
    W/Mono (25210): The request to load the assembly mscorlib v2.0.5.0 was remapp
    ed to v2.0.0.0
    I/ActivityManager( 461): Process com.cyanogenmod.lockclock (pid 21284) has died
    .
    W/ActivityManager( 461): Launch timeout has expired, giving up wake lock!
    E/WindowManager( 461): Starting window AppWindowToken{42ce5178 token=Token{41a4
    1f30 ActivityRecord{41a02250 u0 HerMobileApp.HerMobileApp/hermobileapp.MapEditAc
    tivity t52}}} timed out
    I/MonoDroid(25210): UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Exception o
    f type 'Java.Lang.RuntimeException' was thrown.
    I/MonoDroid(25210): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,i
    ntptr,intptr,Android.Runtime.JValue[]) [0x00084] in /Users/builder/data/lanes/mo
    nodroid-mlion-monodroid-4.12-series/b5dc5ce9/source/monodroid/src/Mono.Android/s
    rc/Runtime/JNIEnv.g.cs:895
    I/MonoDroid(25210): at Android.Runtime.JNIEnv.FinishCreateInstance (intptr,intpt
    r,intptr,Android.Runtime.JValue[]) [0x0000b] in /Users/builder/data/lanes/monodr
    oid-mlion-monodroid-4.12-series/b5dc5ce9/source/monodroid/src/Mono.Android/src/R
    untime/JNIEnv.cs:272
    I/MonoDroid(25210): at Com.Esri.Core.Geodatabase.Geodatabase..ctor (string) [0x0
    0117] in q:_CODE\hersonissos\ArcGISForAndroid\obj\Debug\generated\src\Com.Esri.
    Core.Geodatabase.Geodatabase.cs:78
    I/MonoDroid(25210): at HerMobileApp.MapFragment.OnActivityCreated (Android.OS.Bu
    ndle) [0x000e3] in q:_CODE\hersonissos\HerMobileApp\MapFragment.cs:102
    I/MonoDroid(25210): at Android.App.Fragment.n_OnActivityCreated_Landroid_os_Bund
    le_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlio
    n-monodroid-4.12-series/b5dc5ce9/source/monodroid/src/Mono.Android/platforms/and
    roid-16/src/generated/Android.App.Fragment.cs:729
    I/MonoDroid(25210): at (wrapper dynamic-method) object.0edf914e-289d-4bb3-a858-1
    380ceec827d (intptr,intptr,intptr)
    I/MonoDroid(25210):
    I/MonoDroid(25210): --- End of managed exception stack trace ---
    I/MonoDroid(25210): java.lang.RuntimeException: locale::facet::_S_create_c_local
    e name not valid
    I/MonoDroid(25210): at com.esri.core.geodatabase.Geodatabase.nativeOpen(Nati
    ve Method)
    I/MonoDroid(25210): at com.esri.core.geodatabase.Geodatabase.(Unknown
    Source)
    I/MonoDroid(25210): at com.esri.core.geodatabase.Geodatabase.(Unknown
    Source)
    I/MonoDroid(25210): at hermobileapp.MapFragment.n_onActivityCreated(Native M
    ethod)
    I/MonoDroid(25210): at hermobileapp.MapFragment.onActivityCreated(MapFragmen
    t.java:59)
    I/MonoDroid(25210): at android.app.Fragment.performActivityCreated(Fragment.
    java:1708)
    I/MonoDroid(25210): at android.app.FragmentManagerImpl.moveToState(FragmentM
    anager.java:908)
    I/MonoDroid(25210): at android.app.FragmentManagerImpl.moveToState(FragmentM
    anager.java:1062)
    I/MonoDroid(25210): at android.app.BackStackRecord.run(BackStackRecord.java:
    684)
    I/MonoDroid(25210): at android.app.FragmentManagerImpl.execPendingActions(Fr
    agmentManager.java:1447)
    I/MonoDroid(25210): at android.app.Activity.performStart(Activity.java:5240)

    I/MonoDroid(25210): at android.app.ActivityThread.performLaunchActivity(Acti
    vityThread.java:2180)
    I/MonoDroid(25210): at android.app.ActivityThread.handleLaunchActivity(Activ
    ityThread.java:2266)
    I/MonoDroid(25210): at android.app.ActivityThread.access$800(ActivityThread.
    java:145)
    I/MonoDroid(25210): at android.app.ActivityThread$H.handleMessage(ActivityTh
    read.java:1206)
    I/MonoDroid(25210): at android.os.Handler.dispatchMessage(Handler.java:102)
    I/MonoDroid(25210): at android.os.Looper.loop(Looper.java:136)
    I/MonoDroid(25210): at android.app.ActivityThread.main(ActivityThread.java:5
    141)
    I/MonoDroid(25210): at java.lang.reflect.Method.invokeNative(Native Method)
    I/MonoDroid(25210): at java.lang.reflect.Method.invoke(Method.java:515)
    I/MonoDroid(25210): at com.android.internal.os.ZygoteInit$MethodAndArgsCalle
    r.run(ZygoteInit.java:795)
    I/MonoDroid(25210): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
    va:611)
    I/MonoDroid(25210): at dalvik.system.NativeStart.main(Native Method)
    W/dalvikvm(25210): JNI WARNING: JNI function GetMethodID called with exception p
    ending
    W/dalvikvm(25210): in Lhermobileapp/MapFragment;.n_onActivityCreate
    d:(Landroid/os/Bundle;)V (GetMethodID)
    W/dalvikvm(25210): Pending exception is:
    E/dalvikvm(25210): VM aborting
    E/mono-rt (25210): Stacktrace:
    E/mono-rt (25210):
    E/mono-rt (25210): at <0xffffffff>
    E/mono-rt (25210): at (wrapper managed-to-native) object.wrapper_native_0x416b
    313d (intptr,intptr,string,string)
    E/mono-rt (25210): at (wrapper delegate-invoke) .invoke_intptr__this__
    _intptr_intptr_string_string (intptr,intptr,string,string)
    E/mono-rt (25210): at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string
    ) [0x00042] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/b
    5dc5ce9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:157
    E/mono-rt (25210): at Java.Lang.Throwable.get_Message () [0x00014] in /Users/b
    uilder/data/lanes/monodroid-mlion-monodroid-4.12-series/b5dc5ce9/source/monodroi
    d/src/Mono.Android/platforms/android-16/src/generated/Java.Lang.Throwable.cs:231

    E/mono-rt (25210): at (wrapper runtime-invoke) .runtime_invoke_object_
    _this__ (object,intptr,intptr,intptr)
    E/mono-rt (25210): at <0xffffffff>
    E/mono-rt (25210): at (wrapper dynamic-method) object.0edf914e-289d-4bb3-a858-
    1380ceec827d (intptr,intptr,intptr)
    E/mono-rt (25210): at (wrapper native-to-managed) object.0edf914e-289d-4bb3-a8
    58-1380ceec827d (intptr,intptr,intptr)
    E/mono-rt (25210):
    E/mono-rt (25210):
    E/mono-rt (25210): Got a SIGABRT while executing native code. This usually indic
    ates
    E/mono-rt (25210): a fatal error in the mono runtime or one of the native librar
    ies
    E/mono-rt (25210): used by your application.
    E/mono-rt (25210):
    E/mono-rt (25210):
    I/ActivityManager( 461): Process HerMobileApp.HerMobileApp (pid 25210) has died
    .
    I/ActivityManager( 461): Start proc HerMobileApp.HerMobileApp for activity HerM
    obileApp.HerMobileApp/hermobileapp.MapEditActivity: pid=25240 uid=10133 gids={50
    133, 3003, 1028, 1015}
    W/MonoDroid-Debugger(25240): Trying to initialize the debugger with options: --d
    ebugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8939,server=y,emb
    edding=1
    W/MonoDroid-Debugger(25240): Accepted stdout connection: -1
    F/MonoDroid-Debugger(25240): Error accepting stdout and stderr (127.0.0.1:8940):
    Address already in use
    I/ActivityManager( 461): Process HerMobileApp.HerMobileApp (pid 25240) has died
    .
    I/ActivityManager( 461): Start proc HerMobileApp.HerMobileApp for activity HerM
    obileApp.HerMobileApp/hermobileapp.MapEditActivity: pid=25256 uid=10133 gids={50
    133, 3003, 1028, 1015}
    W/MonoDroid-Debugger(25256): Trying to initialize the debugger with options: --d
    ebugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8939,server=y,emb
    edding=1
    W/MonoDroid-Debugger(25256): Accepted stdout connection: -1
    F/MonoDroid-Debugger(25256): Error accepting stdout and stderr (127.0.0.1:8940):
    Address already in use
    I/ActivityManager( 461): Process HerMobileApp.HerMobileApp (pid 25256) has died
    .
    W/ActivityManager( 461): Force removing ActivityRecord{41a02250 u0 HerMobileApp
    .HerMobileApp/hermobileapp.MapEditActivity t52}: app died, no saved state
    W/InputMethodManagerService( 461): Window already focused, ignoring focus gain
    of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41fd70b0 attribute=n
    ull, token = android.os.BinderProxy@42ce7d40
    I/Timeline( 1164): Timeline: Activity_idle id: android.os.BinderProxy@419de010 t
    ime:28572793
    E/memtrack(25254): Couldn't load memtrack module (No such file or directory)
    E/android.os.Debug(25254): failed to load memtrack module: -2
    I/ActivityManager( 461): Force stopping HerMobileApp.HerMobileApp appid=10133 u
    ser=0: from pid 25254
    I/Timeline( 461): Timeline: Activity_windows_visible id: ActivityRecord{42391f7
    8 u0 com.cyanogenmod.trebuchet/org.cyanogenmod.trebuchet.TrebuchetLauncher t1} t
    ime:28573174

  • g.papadakisg.papadakis GRMember ✭✭

    From the log the exception happens for
    I/MonoDroid(25210): java.lang.RuntimeException: locale::facet::_S_create_c_locale name not valid

    Maybe is related to this bug
    https://svn.boost.org/trac/boost/ticket/9182

  • g.papadakisg.papadakis GRMember ✭✭
    edited July 2014

    Any luck with the offline geodatabase. It is a killing feature for my project. If i don't find any solution i ll move back to native java. So pity i love xamarin

  • MarkRadacz.9381MarkRadacz.9381 USMember, University

    Shawn, downloaded ur example.. and got it compiling.. but when trying to run TestArcGISForAndroid (building for API level 17), get this java.lang.OutOfMemoryError:

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 3. Output:
    UNEXPECTED TOP-LEVEL ERROR:
    java.lang.OutOfMemoryError: Java heap space
    at com.android.dx.ssa.SsaBasicBlock.(SsaBasicBlock.java:131)
    at com.android.dx.ssa.SsaMethod.makeNewGotoBlock(SsaMethod.java:239)
    at com.android.dx.ssa.SsaBasicBlock.insertNewSuccessor(SsaBasicBlock.java:453)
    at com.android.dx.ssa.SsaConverter.edgeSplitMoveExceptionsAndResults(SsaConverter.java:209)
    at com.android.dx.ssa.SsaConverter.edgeSplit(SsaConverter.java:135)
    at com.android.dx.ssa.SsaConverter.convertToSsaMethod(SsaConverter.java:47)
    at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:98)
    at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:72)
    at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:299)
    at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:139)
    at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:94)
    at com.android.dx.command.dexer.Main.processClass(Main.java:682)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
    at com.android.dx.command.dexer.Main.access$600(Main.java:78)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:596)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at com.android.dx.command.dexer.Main.main(Main.java:199)
    at com.android.dx.command.Main.main(Main.java:103)
    (TestArcGISForAndroid)

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    This means it is running out of memory during compilation. The fix is to go into your Android project options to the Android Build section and go to the Advanced tab. There is a text field to configure the Java heap size. I set it to 1G

  • ChrisMillerChrisMiller USBeta, Developer Group Leader ✭✭

    I'm trying to bind to the 10.2.4 SDK and I get the following error compiling the library

    The type or namespace name 'SymbolDictionary' does not exist in the namespace 'Com.Esri.Core.Symbol.Advanced' (are you missing an assembly reference?)

    I started with the metadata.xml that Shawn posted and added the following lines

    <attr path="/api/package[@name='com.esri.core.symbol.advanced']/class[@name='SymbolDictionary']" name="extends">java.lang.Object</attr>
    <attr path="/api/package[@name='com.esri.core.symbol.advanced']/class[@name='SymbolDictionary']" name="extends-generic-aware">java.lang.Object</attr>
    

    But that didn't eliminate the error. Does anyone have a suggestion?

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭
    edited October 2014

    NOTE: The following metadata.xml should build against 10.2.4. However, this metadata.xml does remove some API from the ESRI Android SDK like usual so if you need to use that API in your app, you will have to work harder to fine tune the metadata.xml file to make it visible. For example, the following metadata.xml file removes the entire com.esri.core.portal package. I did not need that so this works for me. I only had to add the 3 new lines at the bottom of this metadata.xml file to make 10.2.4 build as compared to my old 10.2.3 build. Also, I had no issue with SymbolDictionary. Therefore, I would guess you have an issue with the configuration of your project rather than your metadata.xml file. That is why I attached a zip of my solution so that all you have to do is to drop in the ESRI binaries into the correct locations as specified in the csproj files and it should build and run. (I could not redistribute the ESRI binaries).

    <metadata>
      <remove-node path="/api/package[@name='com.esri.android.map.popup']" />
      <remove-node path="/api/package[@name='com.esri.core.geometry']/class[@name='Geometry']/field[@name='m_description']" />
      <remove-node path="/api/package[@name='com.esri.core.geometry']/class[@name='MultiPath']/field[@name='m_impl']" />
      <remove-node path="/api/package[starts-with(@name,'com.esri.core.internal')]" />
      <remove-node path="/api/package[@name='com.esri.core.portal']" />
      <remove-node path="/api/package[@name='com.esri.core.renderer']/class[@name='MultipartColorRamp']" />
      <remove-node path="/api/package[@name='com.esri.core.symbol']/class[@name='PictureMarkerSymbol']/constructor/parameter[@type='java.lang.String']/.." />
    
      <remove-node path="/api/package[@name='org.codehaus.jackson.annotate']" />
      <remove-node path="/api/package[@name='org.codehaus.jackson.impl']" />
      <remove-node path="/api/package[@name='org.codehaus.jackson.io']" />
      <remove-node path="/api/package[@name='org.codehaus.jackson.sym']" />
      <remove-node path="/api/package[@name='org.codehaus.jackson.type']" />
      <remove-node path="/api/package[@name='org.codehaus.jackson.util']" />
      <remove-node path="/api/package[@name='org.codehaus.jackson']/class[@name='Version']" />
    
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='MultiPath']" name="extends">com.esri.core.geometry.Geometry</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='MultiPath']" name="extends-generic-aware">com.esri.core.geometry.Geometry</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='MultiPoint']" name="extends">com.esri.core.geometry.Geometry</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='MultiPoint']" name="extends-generic-aware">com.esri.core.geometry.Geometry</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.ags.geocode']/class[@name='LocatorGeocodeResult']" name="extends">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.ags.geocode']/class[@name='LocatorGeocodeResult']" name="extends-generic-aware">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.ags.geocode']/class[@name='LocatorReverseGeocodeResult']" name="extends">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.ags.geocode']/class[@name='LocatorReverseGeocodeResult']" name="extends-generic-aware">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.geocode']/class[@name='LocatorGeocodeResult']" name="extends">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.geocode']/class[@name='LocatorGeocodeResult']" name="extends-generic-aware">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.geocode']/class[@name='LocatorReverseGeocodeResult']" name="extends">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.geocode']/class[@name='LocatorReverseGeocodeResult']" name="extends-generic-aware">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='Geometry']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='Envelope']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='Line']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='MultiPoint']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='Point']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='Polygon']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.geometry']/class[@name='Polyline']/method[@name='getType']" name="managedName">getGeometryType</attr>
      <attr path="/api/package[@name='com.esri.core.symbol']/class[@name='MultiLayerSymbol']/method[@name='copy']" name="return">com.esri.core.symbol.Symbol</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.ags.query']/class[@name='OutStatistics']/method[@name='getType']" name="managedName">getStatisticsType</attr>
      <attr path="/api/package[@name='com.esri.core.tasks.query']/class[@name='OutStatistics']/method[@name='getType']" name="managedName">getStatisticsType</attr>
      <attr path="/api/package[@name='com.esri.core.map.ogc.kml']/class[@name='KmlNode']/method[@name='getType']" name="managedName">getNodeType</attr>
      <attr path="/api/package[@name='com.esri.core.ogc.wmts']/class[@name='WMTSTileMatrixSet.TileMatrixComparator']/method[@name='compare']/parameter[@name='p0']" name="type">java.lang.Object</attr>
      <attr path="/api/package[@name='com.esri.core.ogc.wmts']/class[@name='WMTSTileMatrixSet.TileMatrixComparator']/method[@name='compare']/parameter[@name='p1']" name="type">java.lang.Object</attr>
    </metadata>
    

    Another change to this version from my previous versions is that I started to have a need for JSON so I changed the core jackson jar to be an EmbeddedJar instead of an EmbeddedReferenceJar. That caused me to add more corrections in the metadata.xml file.

    I have attached a zip of my solution that includes both the binding project and the test android app that runs fine using the new Xamarin Android player. I have deleted all ESRI sdk binaries since I do not have permission to redistribute them.

  • mikescandymikescandy ITBeta, University ✭✭

    I have a slightly different version of your bindings, as I tried to include as much as I could, plus I tried to avoid the "use Object as a return type" solution as much as I could.
    It's still a work in progress, but it's functional.
    You can find my code here https://github.com/mikescandy/ArcgisXamarinBinding (credits to Shawn for the initial version of the bindings)
    There's also a sample application.
    Feedback, PRs and forks are all welcome!

  • VenkateshRengasamyVenkateshRengasamy INMember
    edited November 2014

    Hi,

    Could u anyone suggest on with latest SDK ** ArcGIS Runtime 10.2.4** bindings with Xamarin.Android

  • KostaBidoshiKostaBidoshi USMember

    Hi Everybody, Thanks to Mike's bindings ArcGIS SDK is mostly working with Xamarin. As described above by Geo Papas there is a problem when you try to access a Geodatabase. It is actually when your try to access anything in the file system through ArcGIS SDK. The error is the same as reported above:

    Java.Lang.RuntimeException: locale::facet::_S_create_c_locale name not valid

    It is happening when you access a geodatabase, a network dataset or a locator that is local.

    Any ideas?

  • g.papadakisg.papadakis GRMember ✭✭

    With the new version 10.2.4 loading Rasters form device work just fine
    var rasterSource = new FileRasterSource(Android.OS.Environment.ExternalStorageDirectory.Path + "/raster/0421641220.tif"); var rasterLayer = new RasterLayer(rasterSource); _esriMap.AddLayer(rasterLayer);

    But loading shapefiles doesn't

    var shp = new ShapefileFeatureTable(Android.OS.Environment.ExternalStorageDirectory.Path + "/raster/buildings/buildings.shp"); var fealayer = new FeatureLayer(shp) {Renderer = new SimpleRenderer(new SimpleFillSymbol(Color.Blue))}; _esriMap.AddLayer(fealayer);

    11-11 18:13:36.886 I/ArcGIS (12039): No data tile ETag couldn't be retrieved
    11-11 18:13:37.016 E/ArcGIS (12039): No data tile ETag couldn't be retrieved
    11-11 18:13:37.016 E/ArcGIS (12039): com.esri.core.io.EsriServiceException: Not Found
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.core.internal.io.handler.c.a(SourceFile:563)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.core.internal.io.handler.a.a(SourceFile:87)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.core.internal.tasks.ags.an.a(SourceFile:36)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.retrieveNoDataTileETag(SourceFile:570)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initLayer(SourceFile:201)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer$1.run(SourceFile:132)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.lang.Thread.run(Thread.java:841)
    terminate called after throwing an instance of 'std::runtime_error'
    11-11 18:13:38.616 E/mono-rt (12039): Stacktrace:
    what(): locale::facet::S_create_c_locale name not valid
    In mgmain JNI_OnLoad
    11-11 18:13:38.616 E/mono-rt (12039):
    11-11 18:13:38.616 E/mono-rt (12039): at <0xffffffff>
    11-11 18:13:38.616 E/mono-rt (12039): at (wrapper managed-to-native) object.wrapper_native_0x41158350 (intptr,intptr,intptr,intptr,Android.Runtime.JValue[])
    11-11 18:13:38.626 E/mono-rt (12039): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00060] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:891
    11-11 18:13:38.626 E/mono-rt (12039): at Android.Runtime.JNIEnv.FinishCreateInstance (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x0000b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:272
    11-11 18:13:38.626 E/mono-rt (12039): at Com.Esri.Core.Geodatabase.ShapefileFeatureTable..ctor (string) [0x00117] in q:_CODE\Thlepiskopisi\ArcGISForAndroid\obj\Debug\generated\src\Com.Esri.Core.Geodatabase.ShapefileFeatureTable.cs:51
    11-11 18:13:38.626 E/mono-rt (12039): at HerMobileApp.MapEditActivity.OnCreate (Android.OS.Bundle) [0x00103] in q:_CODE\Thlepiskopisi\HerMobileApp\MapEditActivity.cs:139
    11-11 18:13:38.626 E/mono-rt (12039): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle
    (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.App.Activity.cs:1943
    11-11 18:13:38.626 E/mono-rt (12039): at (wrapper dynamic-method) object.a9971666-5b92-4464-875b-3a7a723e78d9 (intptr,intptr,intptr)
    11-11 18:13:38.626 E/mono-rt (12039): at (wrapper native-to-managed) object.a9971666-5b92-4464-875b-3a7a723e78d9 (intptr,intptr,intptr)
    11-11 18:13:38.626 E/mono-rt (12039):
    11-11 18:13:38.626 E/mono-rt (12039): =================================================================
    11-11 18:13:38.626 E/mono-rt (12039): Got a SIGSEGV while executing native code. This usually indicates
    11-11 18:13:38.626 E/mono-rt (12039): a fatal error in the mono runtime or one of the native libraries
    11-11 18:13:38.626 E/mono-rt (12039): used by your application.
    11-11 18:13:38.626 E/mono-rt (12039): =================================================================
    11-11 18:13:38.626 E/mono-rt (12039):

  • g.papadakisg.papadakis GRMember ✭✭

    With the new version 10.2.4 loading Rasters form device work just fine
    var rasterSource = new FileRasterSource(Android.OS.Environment.ExternalStorageDirectory.Path + "/raster/0421641220.tif"); var rasterLayer = new RasterLayer(rasterSource); _esriMap.AddLayer(rasterLayer);

    But loading shapefiles doesn't

    var shp = new ShapefileFeatureTable(Android.OS.Environment.ExternalStorageDirectory.Path + "/raster/buildings/buildings.shp"); var fealayer = new FeatureLayer(shp) {Renderer = new SimpleRenderer(new SimpleFillSymbol(Color.Blue))}; _esriMap.AddLayer(fealayer);

    11-11 18:13:36.886 I/ArcGIS (12039): No data tile ETag couldn't be retrieved
    11-11 18:13:37.016 E/ArcGIS (12039): No data tile ETag couldn't be retrieved
    11-11 18:13:37.016 E/ArcGIS (12039): com.esri.core.io.EsriServiceException: Not Found
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.core.internal.io.handler.c.a(SourceFile:563)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.core.internal.io.handler.a.a(SourceFile:87)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.core.internal.tasks.ags.an.a(SourceFile:36)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.retrieveNoDataTileETag(SourceFile:570)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initLayer(SourceFile:201)
    11-11 18:13:37.016 E/ArcGIS (12039): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer$1.run(SourceFile:132)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    11-11 18:13:37.016 E/ArcGIS (12039): at java.lang.Thread.run(Thread.java:841)
    terminate called after throwing an instance of 'std::runtime_error'
    11-11 18:13:38.616 E/mono-rt (12039): Stacktrace:
    what(): locale::facet::S_create_c_locale name not valid
    In mgmain JNI_OnLoad
    11-11 18:13:38.616 E/mono-rt (12039):
    11-11 18:13:38.616 E/mono-rt (12039): at <0xffffffff>
    11-11 18:13:38.616 E/mono-rt (12039): at (wrapper managed-to-native) object.wrapper_native_0x41158350 (intptr,intptr,intptr,intptr,Android.Runtime.JValue[])
    11-11 18:13:38.626 E/mono-rt (12039): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00060] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:891
    11-11 18:13:38.626 E/mono-rt (12039): at Android.Runtime.JNIEnv.FinishCreateInstance (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x0000b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:272
    11-11 18:13:38.626 E/mono-rt (12039): at Com.Esri.Core.Geodatabase.ShapefileFeatureTable..ctor (string) [0x00117] in q:_CODE\Thlepiskopisi\ArcGISForAndroid\obj\Debug\generated\src\Com.Esri.Core.Geodatabase.ShapefileFeatureTable.cs:51
    11-11 18:13:38.626 E/mono-rt (12039): at HerMobileApp.MapEditActivity.OnCreate (Android.OS.Bundle) [0x00103] in q:_CODE\Thlepiskopisi\HerMobileApp\MapEditActivity.cs:139
    11-11 18:13:38.626 E/mono-rt (12039): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle
    (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.App.Activity.cs:1943
    11-11 18:13:38.626 E/mono-rt (12039): at (wrapper dynamic-method) object.a9971666-5b92-4464-875b-3a7a723e78d9 (intptr,intptr,intptr)
    11-11 18:13:38.626 E/mono-rt (12039): at (wrapper native-to-managed) object.a9971666-5b92-4464-875b-3a7a723e78d9 (intptr,intptr,intptr)
    11-11 18:13:38.626 E/mono-rt (12039):
    11-11 18:13:38.626 E/mono-rt (12039): =================================================================
    11-11 18:13:38.626 E/mono-rt (12039): Got a SIGSEGV while executing native code. This usually indicates
    11-11 18:13:38.626 E/mono-rt (12039): a fatal error in the mono runtime or one of the native libraries
    11-11 18:13:38.626 E/mono-rt (12039): used by your application.
    11-11 18:13:38.626 E/mono-rt (12039): =================================================================
    11-11 18:13:38.626 E/mono-rt (12039):

  • StevenMorrisStevenMorris USMember, University

    I haven't used the DDMS tool. I did check out the logcat using the Android Debug Bridge and here are the results (filtered)

    Command: adb logcat MonoDroid-Debugger:D monodroid-gc:D Mono:W dalvikvm:W mono-rt:V *:S

    --------- beginning of /dev/log/system --------- beginning of /dev/log/main W/MonoDroid-Debugger(11905): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8839,server=y,emb edding=1 W/MonoDroid-Debugger(11905): Accepted stdout connection: 50 W/monodroid-gc(11905): GREF GC Threshold: 46800 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (11905): The request to load the assembly System.Core v2.0.5.0 was remapped to v3.5.0.0 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/dalvikvm(11905): JNI WARNING: JNI method called with exception pending W/dalvikvm(11905): in Ltestarcgisforandroid/MainActivity;.n_onCreate:(Landroid/os/Bundle;)V (GetMethodID) W/dalvikvm(11905): Pending exception is: E/dalvikvm(11905): VM aborting E/mono-rt (11905): Stacktrace: E/mono-rt (11905): E/mono-rt (11905): at <unknown> <0xffffffff> E/mono-rt (11905): at (wrapper managed-to-native) object.wrapper_native_0x40b2efd1 (intptr,intptr,string,string) <IL 0x0004c, 0xffffffff> E/mono-rt (11905): at (wrapper delegate-invoke) <Module>.invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string) <IL 0x00063, 0xffffff ff> E/mono-rt (11905): at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string) [0x00042] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/a 1e3982a/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:157 E/mono-rt (11905): at Java.Lang.Throwable.get_Message () [0x00014] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/a1e3982a/source/monodroi d/src/Mono.Android/platforms/android-19/src/generated/Java.Lang.Throwable.cs:231 E/mono-rt (11905): at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff> E/mono-rt (11905): at <unknown> <0xffffffff> E/mono-rt (11905): at (wrapper dynamic-method) object.60a3ae85-654e-4b68-b823-e9fd8b83b17b (intptr,intptr,intptr) <IL 0x00034, 0x000a8> E/mono-rt (11905): at (wrapper native-to-managed) object.60a3ae85-654e-4b68-b823-e9fd8b83b17b (intptr,intptr,intptr) <IL 0x00023, 0xffffffff> E/mono-rt (11905): E/mono-rt (11905): ================================================================= E/mono-rt (11905): Got a SIGSEGV while executing native code. This usually indicates E/mono-rt (11905): a fatal error in the mono runtime or one of the native libraries E/mono-rt (11905): used by your application. E/mono-rt (11905): ================================================================= E/mono-rt (11905): W/MonoDroid-Debugger(11961): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8839,server=y,emb edding=1 W/MonoDroid-Debugger(11961): Accepted stdout connection: -1 F/MonoDroid-Debugger(11961): Error accepting stdout and stderr (127.0.0.1:8840): Address already in use W/MonoDroid-Debugger(11978): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8839,server=y,emb edding=1 W/MonoDroid-Debugger(11978): Accepted stdout connection: -1 F/MonoDroid-Debugger(11978): Error accepting stdout and stderr (127.0.0.1:8840): Address already in use W/dalvikvm(12023): VFY: unable to resolve virtual method 505: Landroid/content/Context;.getExternalFilesDirs (Ljava/lang/String;)[Ljava/io/File; W/MonoDroid-Debugger(12217): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8841,server=y,emb edding=1 W/MonoDroid-Debugger(12217): Accepted stdout connection: 50 W/monodroid-gc(12217): GREF GC Threshold: 46800 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (12217): The request to load the assembly System.Core v2.0.5.0 was remapped to v3.5.0.0 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0

  • StevenMorrisStevenMorris USMember, University

    I haven't used the DDMS tool. I did check out the logcat using the Android Debug Bridge and here are the results (filtered)

    Command: adb logcat MonoDroid-Debugger:D monodroid-gc:D Mono:W dalvikvm:W mono-rt:V *:S

    --------- beginning of /dev/log/system --------- beginning of /dev/log/main W/MonoDroid-Debugger(11905): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8839,server=y,emb edding=1 W/MonoDroid-Debugger(11905): Accepted stdout connection: 50 W/monodroid-gc(11905): GREF GC Threshold: 46800 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (11905): The request to load the assembly System.Core v2.0.5.0 was remapped to v3.5.0.0 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (11905): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/dalvikvm(11905): JNI WARNING: JNI method called with exception pending W/dalvikvm(11905): in Ltestarcgisforandroid/MainActivity;.n_onCreate:(Landroid/os/Bundle;)V (GetMethodID) W/dalvikvm(11905): Pending exception is: E/dalvikvm(11905): VM aborting E/mono-rt (11905): Stacktrace: E/mono-rt (11905): E/mono-rt (11905): at <unknown> <0xffffffff> E/mono-rt (11905): at (wrapper managed-to-native) object.wrapper_native_0x40b2efd1 (intptr,intptr,string,string) <IL 0x0004c, 0xffffffff> E/mono-rt (11905): at (wrapper delegate-invoke) <Module>.invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string) <IL 0x00063, 0xffffff ff> E/mono-rt (11905): at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string) [0x00042] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/a 1e3982a/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:157 E/mono-rt (11905): at Java.Lang.Throwable.get_Message () [0x00014] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/a1e3982a/source/monodroi d/src/Mono.Android/platforms/android-19/src/generated/Java.Lang.Throwable.cs:231 E/mono-rt (11905): at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff> E/mono-rt (11905): at <unknown> <0xffffffff> E/mono-rt (11905): at (wrapper dynamic-method) object.60a3ae85-654e-4b68-b823-e9fd8b83b17b (intptr,intptr,intptr) <IL 0x00034, 0x000a8> E/mono-rt (11905): at (wrapper native-to-managed) object.60a3ae85-654e-4b68-b823-e9fd8b83b17b (intptr,intptr,intptr) <IL 0x00023, 0xffffffff> E/mono-rt (11905): E/mono-rt (11905): ================================================================= E/mono-rt (11905): Got a SIGSEGV while executing native code. This usually indicates E/mono-rt (11905): a fatal error in the mono runtime or one of the native libraries E/mono-rt (11905): used by your application. E/mono-rt (11905): ================================================================= E/mono-rt (11905): W/MonoDroid-Debugger(11961): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8839,server=y,emb edding=1 W/MonoDroid-Debugger(11961): Accepted stdout connection: -1 F/MonoDroid-Debugger(11961): Error accepting stdout and stderr (127.0.0.1:8840): Address already in use W/MonoDroid-Debugger(11978): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8839,server=y,emb edding=1 W/MonoDroid-Debugger(11978): Accepted stdout connection: -1 F/MonoDroid-Debugger(11978): Error accepting stdout and stderr (127.0.0.1:8840): Address already in use W/dalvikvm(12023): VFY: unable to resolve virtual method 505: Landroid/content/Context;.getExternalFilesDirs (Ljava/lang/String;)[Ljava/io/File; W/MonoDroid-Debugger(12217): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8841,server=y,emb edding=1 W/MonoDroid-Debugger(12217): Accepted stdout connection: 50 W/monodroid-gc(12217): GREF GC Threshold: 46800 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (12217): The request to load the assembly System.Core v2.0.5.0 was remapped to v3.5.0.0 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0 W/Mono (12217): The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0

  • ChrisMiller.0950ChrisMiller.0950 USUniversity ✭✭

    It looks like we have a work around (courtesy of Xamarin's @IanLeatherbury) for the _S_create_c_locale exception. As @xterm surmised, it was similar to Boost library error.

    The work around is to add the line

    System.Environment.SetEnvironmentVariable ("LANG", "C");
    

    In the OnCreate method of the Activity making the ArcGIS SDK calls.

    We tested (well, technically @KostaBidoshi) it with the bindings that @mikescandy placed up in on GitHub and it worked.

  • IanLeatherbury.4128IanLeatherbury.4128 USMember, Xamarin Team Xamurai

    Thanks @ChrisMiller! I can't take all the credit, @DavidHathaway and one of our engineers did the heavy lifting :-)

  • JeffSiemensJeffSiemens USMember ✭✭
    edited October 2015

    Thanks @ChrisMiller, @IanLeatherbury.9739, and everyone else who contributed to this solution. This fixed the issue for me as well. I spent several hours trying to figure out how to fix this, so I very much appreciate this solution. I would have been dead in the water without this.

2»
Sign In or Register to comment.