java.lang.ClassCastException:$HierarchicalUri cannot be cast to java.util.ArrayList

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 617#227368216
    via GitHub by wninou
  • Sharing cached images using FileProvider
    via Stack Overflow by Makks129
  • Unity3d share image on android
    via Stack Overflow by ssantos
  • GitHub comment 118#52239103
    via GitHub by Dominik-K
  • GitHub comment 118#54828614
    via GitHub by Dominik-K
  • h6.Feature: Right Now, `Ti.Android.Intent` only gives the option to send a single url within the `putExtraUri()` function. We need the option to use the `ACTION_SEND_MULTIPLE` instead of `ACTION_SEND` constant in order to allow an Array of URLs to be passed instead of a single String value. h6.Usage example: {code} var photos = [ firstImage.nativePath, secondImage.nativePath ]; intent.putExtraUri(Ti.Android.EXTRA_STREAM, photos); {code} h6.Expected Result: success intent call h6.Actual Result: Right now it generates an exception: {code} [WARN] Bundle: Key android.intent.extra.STREAM expected ArrayList but value was a$StringUri. The default value <null> was returned. [WARN] Bundle: Attempt to cast generated internal exception: [WARN] Bundle: java.lang.ClassCastException:$StringUri cannot be cast to java.util.ArrayList [WARN] Bundle: at android.os.Bundle.getParcelableArrayList( [WARN] Bundle: at android.content.Intent.getParcelableArrayListExtra( [WARN] Bundle: at android.content.Intent.migrateExtraStreamToClipData( [WARN] Bundle: at [WARN] Bundle: at [WARN] Bundle: at [WARN] Bundle: at [WARN] Bundle: at [WARN] Bundle: at [WARN] Bundle: at org.appcelerator.titanium.proxy.ActivityProxy.startActivity( [WARN] Bundle: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method) [WARN] Bundle: at org.appcelerator.kroll.runtime.v8.V8Function.callSync( [WARN] Bundle: at [WARN] Bundle: at ti.modules.titanium.TitaniumModule$ [WARN] Bundle: at android.os.Handler.handleCallback( [WARN] Bundle: at android.os.Handler.dispatchMessage( [WARN] Bundle: at android.os.Looper.loop( [WARN] Bundle: at org.appcelerator.kroll.KrollRuntime$ {code}
    via by Shuo Liang,
    • java.lang.ClassCastException:$HierarchicalUri cannot be cast to java.util.ArrayList at android.os.Bundle.getParcelableArrayList( at android.content.Intent.getParcelableArrayListExtra( at com.whatsapp.ContactPicker.k( at com.whatsapp.ContactPicker.onCreate( at at at at

    Users with the same issue

    gamebusterz3 times, last one,
    ajinkya_w2 times, last one,
    Diogo Jaym
    Diogo Jaym1 times, last one,
    Riyaz1 times, last one,
    bayukresno5 times, last one,
    11 more bugmates