Android 模拟器无法加载 GPX 文件
GPX files won't load in Android emulator
总结:
我尝试将 GPX 文件加载到 Android 模拟器中,但我收到错误消息 "The table contains errors. No locations were sent"。
重现步骤:
- 打开模拟器
- 点击右侧垂直条中的三个点
- 在 "Location" 选项卡下的 "Extended controls" 弹出窗口中,单击 "LOAD GPX/KML" 和 select 一个 GPX 文件
- 单击 "Play" 按钮
GPX 文件(test.gpx):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
version="1.1"
creator="gpx-poi.com">
<wpt lat="28.0587" lon="-82.4139">
<time>2015-12-01T03:01:44Z</time>
</wpt>
</gpx>
预期行为:
位置应该发送到模拟器
观察到的行为:
错误信息"The table contains errors. No locations were sent":
设备和Android版本:
模拟器 Nexus 5X API 级别 23(Google APIs),1080 x 1920; 420 dpi,Android 6.0 (Google APIs),x86,1GB on Windows 7 Enterprise SP1 64 位
截至 2016 年 8 月 10 日,模拟器似乎不支持 GPX 航点格式:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
version="1.1"
creator="gpx-poi.com">
<wpt lat="28.0587" lon="-82.4139">
<time>2015-12-01T03:01:44Z</time>
</wpt>
</gpx>
但是,它似乎确实支持 GPX 轨道格式:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
version="1.1"
creator="gpx-poi.com">
<trk>
<name />
<cmt />
<trkseg>
<trkpt lat="28.0587" lon="-82.4139">
<ele>0</ele>
<time>2015-12-01T03:01:44Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
以上 GPX 轨道格式成功加载到模拟器中并正确注入位置。
总结:
我尝试将 GPX 文件加载到 Android 模拟器中,但我收到错误消息 "The table contains errors. No locations were sent"。
重现步骤:
- 打开模拟器
- 点击右侧垂直条中的三个点
- 在 "Location" 选项卡下的 "Extended controls" 弹出窗口中,单击 "LOAD GPX/KML" 和 select 一个 GPX 文件
- 单击 "Play" 按钮
GPX 文件(test.gpx):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
version="1.1"
creator="gpx-poi.com">
<wpt lat="28.0587" lon="-82.4139">
<time>2015-12-01T03:01:44Z</time>
</wpt>
</gpx>
预期行为:
位置应该发送到模拟器
观察到的行为:
错误信息"The table contains errors. No locations were sent":
设备和Android版本:
模拟器 Nexus 5X API 级别 23(Google APIs),1080 x 1920; 420 dpi,Android 6.0 (Google APIs),x86,1GB on Windows 7 Enterprise SP1 64 位
截至 2016 年 8 月 10 日,模拟器似乎不支持 GPX 航点格式:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
version="1.1"
creator="gpx-poi.com">
<wpt lat="28.0587" lon="-82.4139">
<time>2015-12-01T03:01:44Z</time>
</wpt>
</gpx>
但是,它似乎确实支持 GPX 轨道格式:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
version="1.1"
creator="gpx-poi.com">
<trk>
<name />
<cmt />
<trkseg>
<trkpt lat="28.0587" lon="-82.4139">
<ele>0</ele>
<time>2015-12-01T03:01:44Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
以上 GPX 轨道格式成功加载到模拟器中并正确注入位置。