question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.RuntimeException: Unable to start activity ComponentInfo

See original GitHub issue

java.lang.RuntimeException: Unable to start activity ComponentInfo

   new MaterialFilePicker()
                            .withActivity(mActivity)
                            .withRequestCode(78)
                            .withFilter(Pattern.compile(".*\\.txt$")) // Filtering files and directories by file name using regexp
                            .withFilterDirectories(true) // Set directories filterable (false by default)
                            .withHiddenFiles(true) // Show hidden files and folders
                            .start();
02-21 23:57:55.546 6715-6715/com.google.android.demo E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                  Process: com.google.android.exoplayer2.demo, PID: 6715
                                                                                  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.exoplayer2.demo/com.nbsp.materialfilepicker.ui.FilePickerActivity}: java.lang.ArrayIndexOutOfBoundsException: length=1926; index=8172
                                                                                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2455)
                                                                                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2515)
                                                                                      at android.app.ActivityThread.access$1000(ActivityThread.java:154)
                                                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
                                                                                      at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                      at android.os.Looper.loop(Looper.java:157)
                                                                                      at android.app.ActivityThread.main(ActivityThread.java:5555)
                                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
                                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
                                                                                   Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1926; index=8172
                                                                                      at android.content.res.TypedArray.getValueAt(TypedArray.java:1134)
                                                                                      at android.content.res.TypedArray.getColor(TypedArray.java:448)
                                                                                      at android.app.Activity.onApplyThemeResource(Activity.java:3837)
                                                                                      at android.view.ContextThemeWrapper.initializeTheme(ContextThemeWrapper.java:150)
                                                                                      at android.view.ContextThemeWrapper.setTheme(ContextThemeWrapper.java:94)
                                                                                      at android.support.v7.app.AppCompatActivity.setTheme(AppCompatActivity.java:89)
                                                                                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
                                                                                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2515) 
                                                                                      at android.app.ActivityThread.access$1000(ActivityThread.java:154) 
                                                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379) 
                                                                                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                      at android.os.Looper.loop(Looper.java:157) 
                                                                                      at android.app.ActivityThread.main(ActivityThread.java:5555) 
                                                                                      at java.lang.reflect.Method.invoke(Native Method) 
                                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745) 
                                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635) 

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
prscXcommented, Jan 26, 2019

Hi @anonym24, I have got the fix in order to resolve this.

Basically it is trying to look for few color props. After looking to library example looks like we have to define colors.xml in app res with below value:


<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#3F51B5</color>
    <color name="colorPrimaryDark">#303F9F</color>
    <color name="colorAccent">#FF4081</color>
</resources>

Ideally this should have been defined in README, not sure why they have missed to specify the same.

Thanks Pranav

0reactions
NokisDemoxcommented, Mar 24, 2019

@prscX you saved my life, I didnt know what was wrong. That should be added to the readme

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - java.lang.RuntimeException: Unable to start activity ...
When creating the NavHostFragment using FragmentContainerView or if manually adding the NavHostFragment to your activity via a FragmentTransaction, attempting ...
Read more >
Solved: Error : Unable to start activity ComponentInfo com...
Solved: Hi, i'm new to visa, and trying to integrate Visa SDK for android, the sample can successfully run at my android studio....
Read more >
java.lang.RuntimeException: Unable to start activity ... - GitHub
I'm facing some issues with the latest version of the package ( flutter_appauth: 4.2.0 ):. It seems like some activity for ...
Read more >
In-App Payment Android: java.lang.RuntimeException: Unable ...
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.links.fitness/sqip.internal.CardEntryActivity}: java.lang.
Read more >
Unable to instantiate activity ComponentInfo : r/androiddev
RuntimeException : Unable to instantiate activity ComponentInfo{com.example. ... ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found