Google NativeScript映射java.lang.NoClassDefFoundError:无法解析以下代码:Lorg/apache/http/ProtocolVersion [英] NativeScript Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion

本文介绍了Google NativeScript映射java.lang.NoClassDefFoundError:无法解析以下代码:Lorg/apache/http/ProtocolVersion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我切换到{N} 5.0,现在我遇到了nativescript-google-map-sdk问题, 与此处相同的错误: Android Google Maps java.lang.NoClassDefFoundError:失败的解析度:Lorg/apache/http/ProtocolVersion

I switched to {N} 5.0, now i have an issue with nativescript-google-map-sdk, same error as here: Android Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion

Android API 28问题,应该在清单中手动设置一个配置, https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library

The issue with Android API 28, there is a config that should be set manually in manifetst, https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library

当我添加

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

到我的App_Resources/Android/AndroidManifest.xml

to my App_Resources/Android/AndroidManifest.xml

我收到此错误

* What went wrong:

任务':app:processDebugResources'的执行失败.

Execution failed for task ':app:processDebugResources'.

Android资源链接失败 输出:/Users/rudm/dev/mobile/new5/platforms/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:21:错误:在.

Android resource linking failed Output: /Users/rudm/dev/mobile/new5/platforms/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:21: error: unexpected element found in .

有没有一种方法可以使Google Map与{N} 5.0一起使用?

is there a way to make google map working with {N} 5.0?

推荐答案

只需在应用标签的末尾添加uses-library

Just add uses-library at the end of application tag

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

这篇关于Google NativeScript映射java.lang.NoClassDefFoundError:无法解析以下代码:Lorg/apache/http/ProtocolVersion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆