Cannot load GPX/KML data into Android emulator (API 30)
Asked Answered
C

1

6

I've been trying to load a GPX/KML into my virtual Android device but the "Extended Controls" window just spins forever. I eventually close it, close the emulator, and open it again and sometimes the route will show up in the list, but clicking it again brings up the "Loading Saved Route" indicator (which never goes away).

I've tried re-creating the virtual device instance, wiping data, and cold booting but it doesn't help. I created my routes in Google Maps and converted them to GPX. Then I simplified the GPX (to reduce points) and added timestamps, but nothing works.

I am able to load GPX files with a single point without issue.

I'm running Manjaro Linux with KDE.

AVD Info

  • Pixel 4
  • API 30
  • Android 11.0 Google Play
  • x86

Android Studio Info

  • Android Studio Chipmunk | 2021.2.1 Patch 1
  • Build #AI-212.5712.43.2112.8609683, built on May 18, 2022
  • Runtime version: 11.0.12+0-b1504.28-7817840 amd64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • Linux 5.16.20-2-manjaro
  • GC: G1 Young Generation, G1 Old Generation
  • Memory: 1280M
  • Cores: 8
  • Registry: external.system.auto.import.disabled=true

It hangs!

Calefaction answered 31/5, 2022 at 2:32 Comment(8)
It is unclear where you try to load a klm file in. In the emulator? Where should it land? How? – Bunch
@Bunch Updated screenie in the OP. – Calefaction
??? I have no idea where this is about. – Bunch
Interesting. I am running Manjaro Gnome and getting the same result. πŸ€” Did you manage to resolve it? – Colic
Same problem on Ubuntu 22.04 with Android Studio 2021.3.1 and Pixel 3 API 26 Emulator 31.3.10-8807927. Spinning wheel when selecting a previously imported file. Inside .android/locations/routes/ there is a route.json that seems the result of converting the GPX file. It is identical to one that used to work for me a year ago. – Ascent
Seems a bug: issuetracker.google.com/issues/197332854 – Ascent
@RobertasSetkus I moved on to something else, and haven't gone back to the project I was working on at the time. Sorry! – Calefaction
It started to happen to me too for no reason, they didn't fix this bug for 2 years, what's wrong with them? – Irresolvable
J
7

I was struggling with this for about half a day and ultimately was able to fix the issue by updating the Android Emulator tool (File -> Settings -> Appearence & Behaviour -> System Settings -> Android SDK -> SDK Tools).

Screenshot from IDE

Janerich answered 13/11, 2022 at 10:49 Comment(2)
Unbelievable, but it will still work in 2024 :) The path is a little bit different, but works! – Fret
Worked for me too. Funny just a day after you i had to do the same. – Irresolvable

© 2022 - 2024 β€” McMap. All rights reserved.