gpt4 book ai didi

android - 如果我使用 sdk 29,应用程序会因 MapView 而崩溃 ------

转载 作者:行者123 更新时间:2023-11-29 22:52:58 33 4
gpt4 key购买 nike

我对 MapView 有疑问。在我使用“targetSdkVersion 19”之前,我的 map 已正确加载,但由于我每次启动 map Activity 时都更新为“targetSdkVersion 29”,应用程序崩溃了。谁能告诉我可能是什么问题?

2019-08-29 17:04:05.679 29021-29119/mcsistemi.tentatavendita E/AndroidRuntime: FATAL EXCEPTION: Thread-8
Process: mcsistemi.tentatavendita, PID: 29021
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at ce.b(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):3)
at cb.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):3)
at cd.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):14)
at com.google.maps.api.android.lib6.drd.ak.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):4)
at bf.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):22)
at bf.run(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):8)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/000000c6/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/000000c6/MapsDynamite.apk!/lib/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ad.loadClass(:com.google.android.gms.dynamite_dynamiteloader@19056081@19.0.56 (100400-262933554):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at ce.b(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):3) 
at cb.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):3) 
at cd.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):14) 
at com.google.maps.api.android.lib6.drd.ak.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):4) 
at bf.a(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):22) 
at bf.run(:com.google.android.gms.dynamite_mapsdynamite@19056081@19.0.56 (100400-262933554):8) 

最佳答案

<application> 下添加这个在 Manifest.xml 中标记

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

With Android 6.0, we removed support for the Apache HTTP client. Beginning with Android 9, that library is removed from the bootclasspath and is not available to apps by default.

To continue using the Apache HTTP client, apps that target Android 9 and above can add the above line to their AndroidManifest.xml:

这里有更多info由谷歌

关于android - 如果我使用 sdk 29,应用程序会因 MapView 而崩溃 ------,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57712884/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com