NativeScript Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion

陌路散爱 提交于 2019-12-24 10:37:31

问题


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

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

When I add

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

to my App_Resources/Android/AndroidManifest.xml

i get this error

* What went wrong:

Execution failed for task ':app:processDebugResources'.

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 .

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


回答1:


Just add uses-library at the end of application tag

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


来源:https://stackoverflow.com/questions/53324898/nativescript-google-maps-java-lang-noclassdeffounderror-failed-resolution-of-l

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!