Select to view content in your preferred language

Map won't load in .NET Runtime SDK 100.0 running Android 7.1

4377
7
05-01-2017 10:28 AM
CalebPourchot
Regular Contributor

I've been using the runtime sdk successfully with Xamarin and Android 6.x. I just tested the same code on a Nexus 6p device running Android 7.1 and I get this error (repeated a million times) when I launch the activity with the mapview:

05-01 12:21:33.754 D/Mono (10585): [0x7306e0b450] worker starting
05-01 12:21:33.756 D/Mono (10585): [0x7306c0a450] worker starting
05-01 12:21:33.756 D/Mono (10585): [0x7306808450] worker starting
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:45: 'texture2D' : type is for Vulkan api only
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:45: 'texture2D' : cannot construct this type
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:45: 'constructor' : too many arguments
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:45: 'b' : field selection requires structure, vector, or matrix on left hand side
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:46: 'texture2D' : type is for Vulkan api only
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:46: 'texture2D' : cannot construct this type
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:46: 'constructor' : too many arguments
05-01 12:21:33.760 I/Adreno (10585): ERROR: 0:46: 'g' : field selection requires structure, vector, or matrix on left hand side
05-01 12:21:33.760 I/Adreno (10585): E
05-01 12:21:33.760 D/Mono (10585): [0x7306a09450] worker starting
05-01 12:21:33.761 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.761 D/Mono (10585): Searching for 'CoreRT_Error_getCode'.
05-01 12:21:33.761 D/Mono (10585): Probing 'CoreRT_Error_getCode'.
05-01 12:21:33.761 D/Mono (10585): Found as 'CoreRT_Error_getCode'.
05-01 12:21:33.762 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.762 D/Mono (10585): Searching for 'CoreRT_Error_getDomain'.
05-01 12:21:33.762 D/Mono (10585): Probing 'CoreRT_Error_getDomain'.
05-01 12:21:33.762 D/Mono (10585): Found as 'CoreRT_Error_getDomain'.
05-01 12:21:33.762 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.762 D/Mono (10585): Searching for 'CoreRT_Error_getMessage'.
05-01 12:21:33.762 D/Mono (10585): Probing 'CoreRT_Error_getMessage'.
05-01 12:21:33.763 D/Mono (10585): Found as 'CoreRT_Error_getMessage'.
05-01 12:21:33.763 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.763 D/Mono (10585): Searching for 'CoreRT_Error_getAdditionalMessage'.
05-01 12:21:33.763 D/Mono (10585): Probing 'CoreRT_Error_getAdditionalMessage'.
05-01 12:21:33.763 D/Mono (10585): Found as 'CoreRT_Error_getAdditionalMessage'.
05-01 12:21:33.765 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.765 D/Mono (10585): Searching for 'CoreRT_TileRequest_handleResponseNoDataTile'.
05-01 12:21:33.765 D/Mono (10585): Probing 'CoreRT_TileRequest_handleResponseNoDataTile'.
05-01 12:21:33.765 D/Mono (10585): Found as 'CoreRT_TileRequest_handleResponseNoDataTile'.
05-01 12:21:33.770 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.770 D/Mono (10585): Searching for 'CoreRT_Error_getAdditionalInformation'.
05-01 12:21:33.770 D/Mono (10585): Probing 'CoreRT_Error_getAdditionalInformation'.
05-01 12:21:33.770 D/Mono (10585): Found as 'CoreRT_Error_getAdditionalInformation'.
05-01 12:21:33.771 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.771 D/Mono (10585): Searching for 'CoreRT_Dictionary_getKeys'.
05-01 12:21:33.771 D/Mono (10585): Probing 'CoreRT_Dictionary_getKeys'.
05-01 12:21:33.771 D/Mono (10585): Found as 'CoreRT_Dictionary_getKeys'.
05-01 12:21:33.771 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.771 D/Mono (10585): Searching for 'CoreRT_Dictionary_at'.
05-01 12:21:33.771 D/Mono (10585): Probing 'CoreRT_Dictionary_at'.
05-01 12:21:33.771 D/Mono (10585): Found as 'CoreRT_Dictionary_at'.
05-01 12:21:33.772 D/Mono (10585): DllImport searching in: 'libRuntimeCoreNet' ('libRuntimeCoreNet.so').
05-01 12:21:33.772 D/Mono (10585): Searching for 'CoreRT_Element_getObjectType'.
05-01 12:21:33.772 D/Mono (10585): Probing 'CoreRT_Element_getObjectType'.
05-01 12:21:33.772 D/Mono (10585): Found as 'CoreRT_Element_getObjectType'.
05-01 12:21:33.775 D/Mono (10585): [0x7306a09450] hill climbing, change max number of threads 8
05-01 12:21:33.785 E/MapView (10585): Esri.ArcGISRuntime.ArcGISRuntimeException: Internal error exception: tex_quad_b8g8r8a8un_custom_filter,GL_FRAGMENT_SHADER:ERROR: 0:45: 'texture2D' : type is for Vulkan api only
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:45: 'texture2D' : cannot construct this type
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:45: 'constructor' : too many arguments
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:45: 'b' : field selection requires structure, vector, or matrix on left hand side
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:46: 'texture2D' : type is for Vulkan api only
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:46: 'texture2D' : cannot construct this type
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:46: 'constructor' : too many arguments
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:46: 'g' : field selection requires structure, vector, or matrix on left hand side
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:47: 'texture2D' : type is for Vulkan api only
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:47: 'texture2D' : cannot construct this type
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:47: 'constructor' : too many arguments
05-01 12:21:33.785 E/MapView (10585): ERROR: 0:47: 'r' : field selection requires structure, vector, or matrix on left hand side
05-01 12:21:33.785 E/MapView (10585): ERROR: 12 compilation errors. No code generated.
05-01 12:21:33.785 E/MapView (10585):
05-01 12:21:33.785 E/MapView (10585):
05-01 12:21:33.785 E/MapView (10585): at Esri.ArcGISRuntime.ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException) [0x00013] in <687a544c38e8410dbac0acfc0843ba7e>:0
05-01 12:21:33.785 E/MapView (10585): at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError (System.IntPtr errorHandle, System.Boolean throwOnFailure, System.Runtime.InteropServices.GCHandle wrapperHandle) [0x0002e] in <687a544c38e8410dbac0acfc0843ba7e>:0
05-01 12:21:33.785 E/MapView (10585): at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Draw (RuntimeCoreNet.GeneratedWrappers.CoreDevice device) [0x0001f] in <687a544c38e8410dbac0acfc0843ba7e>:0
05-01 12:21:33.785 E/MapView (10585): at Esri.ArcGISRuntime.UI.Controls.MapGLSurfaceView.Android.Opengl.GLSurfaceView.IRenderer.OnDrawFrame (Javax.Microedition.Khronos.Opengles.IGL10 gl) [0x00019] in <687a544c38e8410dbac0acfc0843ba7e>:0

UPDATE: All the ESRI samples on GitHub work with this device. However, if I simply create a new android project using visual studio's templates and replace the main activity with the exact code from the "Display a Map" sample from ESRI:

[Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
// Create and hold reference to the used MapView
private MapView _myMapView = new MapView();

protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);

Title = "Display a map";

// Create the UI, setup the control references and execute initialization
CreateLayout();
Initialize();
}

private void Initialize()
{
// Create new Map with basemap
Map myMap = new Map(Basemap.CreateImagery());

// Provide used Map to the MapView
_myMapView.Map = myMap;
}

private void CreateLayout()
{
// Create a new vertical layout for the app
var layout = new LinearLayout(this) { Orientation = Orientation.Vertical };

// Add the map view to the layout
layout.AddView(_myMapView);

// Show the layout in the app
SetContentView(layout);
}
}

Running this results in the same error on that device. So, I can't tell why the sample code works when deployed from the ESRI projects, but the very same code doesn't work in a new project.

0 Kudos
7 Replies
CalebPourchot
Regular Contributor

It also works just fine on a Moto G4 running Android 7.0. 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

What supported architectures do you have enabled? (Project Properties > Android Options > Advanced tab).

Note the samples are: `<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>`

Cheers

Mike

0 Kudos
CalebPourchot
Regular Contributor

Just armeabi-v7a

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Thanks for confirming. I cannot currently explain why the samples work and yet a new project from the Android template does not. Potentially it's due to a difference in the project settings. 

But we're also investigating a potential issue with our shader usage of Open GL ES APIs.

Cheers

Mike

0 Kudos
dotMorten_esri
Esri Notable Contributor

Can you zip up your simple repro app and share it here? We have not been able to reproduce this in-house yet.

0 Kudos
CalebPourchot
Regular Contributor

I've put the project on my Google Drive. I hope that works for you.

https://drive.google.com/file/d/0B17QHmpiB_4ma1NBVlk0ZGpJaEk/view?usp=sharing

I will also say that I can no longer reproduce the problem after a recent android system update. 

0 Kudos
dotMorten_esri
Esri Notable Contributor

I looked at your project settings, and you have all the architectures enabled, including the non-supported 64bit (We added a build error to Update 1 so this won't get you again):

We do have 64bit support coming in a future update, but it needs some more work.

0 Kudos