地图片段导致活动崩溃后更新targetSDKVersion从27到29



我有这个地图片段里面导致我的应用程序崩溃:

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />

但是将我的目标SDK从29更改回27并不会破坏它。知道为什么吗?

只需要在manifest的应用程序元素中添加<uses-library android:name="org.apache.http.legacy" android:required="false"/>

最新更新