delphi 在Android 9 设备上使用TMapView 的解决方案  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi 在Android 9 设备上使用TMapView 的解决方案


在 Google Play 商店上启动我的应用程序后,我开始在 Android 9 设备上收到错误声明。


经过几天的研究,我遇到了问题,TMapView。这个最近被广泛使用的组件似乎在这个新版本的 Android 上产生了某种错误。


为 Android 9 正确配置 TMapView

首先,正如我们通常所做的那样,我们必须配置 apiKey,为此我们转到菜单Project -> Options -> Application -> Version Info,并在那里填写 apiKey 字段。

360截图-664265.png


然后我们选中位于 Project -> Options -> Aplication -> Entitlement List 中的Map Services框


TMapView-2 (1).png

然后,在这里真正解决在Android的9 TMapView问题,是在AndroidManifest.template.xml增加,正是在应用部分下面的命令行。


<uses-library android:name="org.apache.http.legacy" android:required="false" />

该应用程序的部分的 AndroidManifest仍然 如下:


<application android:persistent="%persistent%"

    android:restoreAnyVersion="%restoreAnyVersion%"

    android:label="%label%"

    android:debuggable="%debuggable%"

    android:largeHeap="%largeHeap%"

    android:icon="%icon%"

    android:theme="%theme%"

    android:hardwareAccelerated="%hardwareAccelerated%"

    android:resizeableActivity="false">

 

<!-- Esta línea soluciona el problema de Android 9 -->

<uses-library android:name="org.apache.http.legacy" android:required="false" />

 

    <%provider%>

    <%application-meta-data%>

    <%services%>

并编译...



推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.053144931793213 seconds