Select to view content in your preferred language

Displaying Maps after Dev Environment Config

1607
3
04-17-2023 02:32 PM
jcziesch
Occasional Contributor

New to android dev: I am having issues displaying the git hub kotlin samples using the android studio emulator. As far as I know, my dev environment is configured correctly (API_KEY is set, etc...) but I am wondering if this is common and perhaps there are some solutions to look for that will help solve this problem

Any advice appreciated, thank you.

Here is my console code after running the kotlin sample 'display-map' https://github.com/Esri/arcgis-maps-sdk-kotlin-samples/tree/main/display-map

 

04/17 14:26:17: Launching 'display-map' on Pixel 4 API 33.
Install successfully finished in 553 ms.
$ adb shell am start -n "com.esri.arcgismaps.sample.displaymap/com.esri.arcgismaps.sample.displaymap.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 25094 on device 'Pixel_4_API_33 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/base.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/base.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.en.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.en.dm': No such file or directory
W/mple.displaymap: Entry not found
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.x86_64.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.x86_64.dm': No such file or directory
W/mple.displaymap: Entry not found
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.xxhdpi.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.xxhdpi.dm': No such file or directory
W/mple.displaymap: Entry not found
D/nativeloader: Configuring classloader-namespace for other apk /data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/base.apk:/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.en.apk:/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.x86_64.apk:/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.xxhdpi.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/lib/x86_64:/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/base.apk!/lib/x86_64:/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrWCUW1kFfQVS0jSNk_w==/split_config.en.apk!/lib/x86_64:/data/app/~~VrIjkmWmnEoWaJ-WVgkAIw==/com.esri.arcgismaps.sample.displaymap-oKnrW
W/mple.displaymap: JIT profile information will not be recorded: profile file does not exist.
W/mple.displaymap: JIT profile information will not be recorded: profile file does not exist.
W/mple.displaymap: JIT profile information will not be recorded: profile file does not exist.
V/GraphicsEnvironment: ANGLE Developer option for 'com.esri.arcgismaps.sample.displaymap' set to: 'default'
V/GraphicsEnvironment: ANGLE GameManagerService for com.esri.arcgismaps.sample.displaymap: false
V/GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so
D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /vendor/lib64/egl/libGLESv2_emulation.so
W/mple.displaymap: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
W/mple.displaymap: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
D/CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10160; state: ENABLED
D/HostConnection: createUnique: call
D/HostConnection: HostConnection::get() New Host Connection established 0x76b40cacf7d0, tid 25122
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
W/OpenGLRenderer: Failed to initialize 101010-2 format, error = EGL_SUCCESS
D/EGL_emulation: eglCreateContext: 0x76b40cacf710: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0x76b40cacf710: ver 2 0 (tinfo 0x76b61fec8080) (first time)
I/Gralloc4: mapper 4.x is not supported
D/HostConnection: createUnique: call
D/HostConnection: HostConnection::get() New Host Connection established 0x76b40cad0d90, tid 25122
D/goldfish-address-space: allocate: Ask for block of size 0x100
D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f3ffe000 size 0x2000
W/Gralloc4: allocator 4.x is not supported
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
I/TextureView: onSurfaceTextureAvailable
I/TextureView: full init
D/HostConnection: createUnique: call
D/HostConnection: HostConnection::get() New Host Connection established 0x76b40cad1d50, tid 25140
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
D/EGL_emulation: eglCreateContext: 0x76b40cad0550: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0x76b40cad0550: ver 2 0 (tinfo 0x76b61fec8180) (first time)
I/TextureView: Detected version: OpenGL ES 2.0 (OpenGL ES 3.0 SwiftShader 4.0.0.1)
I/TextureView: eglCreateContext succeeded for OpenGLES version 2
I/TextureView: onSurfaceTextureAvailable done
I/TextureView: Starting pulse
D/TrafficStats: tagSocket(95) with statsTag=0xffffffff, statsUid=-1
W/Parcel: Expecting binder but got null!
W/System: A resource failed to call close.

jcziesch_0-1681767027405.png

 

0 Kudos
3 Replies
Shubham_Sharma
Esri Contributor

@jcziesch 

We will need more information on how you're running the app and the device specifications. The log message doesn't help determine the issue you're facing, so I can help by providing a few guidelines for running the app. Feel free to respond to the thread if you still find the issue. Follow the steps to launch a display map sample:

  1. Open the project at the root level directory: "arcgis-maps-sdk-kotlin-samples/" 
  2. Add the API key using the global "gradle.properties" file. (Instructions)
  3. Go to File-> "Sync Project with Gradle files". Open the "Build" tab and keep an eye on the log messages to verify the project builds with success.
  4. Choose a sample ("Display Map") and click run. If issues still persist, please test on a physical device to eliminate any emulator issues. 
0 Kudos
jcziesch
Occasional Contributor

Hello, thank you for the input and I apologize for the late response. I verified the steps you mentioned and though I have not been able to test a physical device, everything else has been verified.  Android Studio cannot access repositories necessary to build/use ArcGIS Kotlin applications due to various network and security protocols. Because we operate from our network access/requests are issue, I am looking at offline repo options as mentioned in the Kotlin SDK documentation. 

0 Kudos
Shubham_Sharma
Esri Contributor

Hope you were able to find a workable implementation.

Here is a related post on allowing Android Studio to pull in the remote repositories in restricted networks: 

https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/failed-to-resolve-com-esri-ar...

0 Kudos