title: Android : crash because java class not found
body: <p>My goal is to be able to make my Android TV Mi Box S (Oreo 8.1) transcode properly Dolby Digital+ (EAC3) sounds to Dolby Digital (AC3) and output it to, my AVR through SPDIF.</p>
  
  <p>This transcodindg is possible with Kodi 18.1 applicition but is not proposed by other application or Android 8.1 settings. As Kodi is able to do it I reverse engineered Android stack. My conclusion are : - Android Oreo embeds any necessary codecs ans other stuff to do this transcoding but does not propose the settings to configure this - Android Pie proposes the wanted surround sound setting (output Dolby Digital on SPDIF)</p>
  
  <p>So my goal is to backport Android TvSettings application from Pie to Oreo</p>
  
  <p>I first tryed to generate TvSettings with Android Studio. I hacked the application resources but stopped when I understood that I would have to generate platfom dependacies (for instance SettingsLib.jar)</p>
  
  <p>My second trial is to generate the entire Android platform. The build is complete and I can deploy TvSettings application on a x86 TV simulation BUT when I launched the TvSettings appplication I get this error :</p>
  
  <p>--------- beginning of crash</p>
  
  <blockquote>
    <p>2019-04-01 12:21:04.976 3987-3987/com.android.tv.settings
    E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.android.tv.settings, PID: 3987
        java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider:
    java.lang.ClassNotFoundException: Didn't find class
    "android.support.v4.content.FileProvider" on path: DexPathList[[zip
    file
    "/data/app/com.android.tv.settings-2DkaCncwGQ874WP-kx3G4Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.tv.settings-2DkaCncwGQ874WP-kx3G4Q==/lib/x86,
    /system/lib, /vendor/lib]]</p>
  </blockquote>
  
  <p>I searched this error on internet and it seems that it deals with multidex feature. This multidex feature is well documented for clean developped Android appliacation but nor reaally for applications extracted from Android platform and deployed with adb.</p>
  
  <p>This problem is related to java libraries loading. 
  I found threads referring Android multidex feature but only for applications buils with Android Studio/Gradle and my app was build with Android platform</p>
  
  <p>What can I do?</p>