uservoice / uservoice-android-sdk

UserVoice Android SDK
https://www.uservoice.com/mobile/
MIT License
117 stars 105 forks source link

Android 9 PIE startup crash #277

Open marekhalmo opened 5 years ago

marekhalmo commented 5 years ago

On Android 9 and some distributions of 8.1 you get a NoClassDefinition exception at start for some HTTP class.

This happens when uservoice sdk is trying to access some remote resource. The HTTP class was removed from the google JDK implementation (as it is probably deprecated)

TEMPORARY FIX The fix is to add

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

to your manifest files (i added them to the sdk as well as to the app (i'm not sure which one fixes the issue, but it works this way).

Please check this and remove the dependency to HTTP class. It crashes on any Android 9 AVD so you can easily reproduce this.