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

1

1

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?

Myoglobin answered 15/11, 2018 at 17:26 Comment(0)
M
2

Just add uses-library at the end of application tag

<uses-library android:name="org.apache.http.legacy" android:required="false"/>
</application>
Myoglobin answered 15/11, 2018 at 17:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.