Crash on SearchActivity
See original GitHub issueIssue / Feature - Issue FolioReader version - 0.4.2 FolioReader Stock / Modified - Stock Android SDK - 7.0 Mobile / Tablet / Emulator Info - Samsung Galaxy J7 (2016) Crash / Error - Crash
Steps to reproduce / Describe in detail -
App crash when I tap search. The library is included as module.
Here is the message i get.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.karv.lxphlaws/com.folioreader.ui.folio.activity.SearchActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.Toolbar.addOnLayoutChangeListener(android.view.View$OnLayoutChangeListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.Toolbar.addOnLayoutChangeListener(android.view.View$OnLayoutChangeListener)' on a null object reference
at com.folioreader.ui.folio.activity.SearchActivity.init(SearchActivity.kt:113)
at com.folioreader.ui.folio.activity.SearchActivity.onCreate(SearchActivity.kt:106)
at android.app.Activity.performCreate(Activity.java:6956)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Why does my activity crash when trying to search recycler view?
The only way to not get the crash is to wait for around 4 seconds and scroll a little bit till it fully...
Read more >Detect and diagnose crashes - Android Developers
Solving crashes can be difficult. However, if you can identify the root cause of the crash, most likely you can find a solution...
Read more >Manage Crash Detection on iPhone 14 models - Apple Support
Use iPhone to detect a Crash Detection event. ... crash and gives them your latitudinal and longitudinal coordinates with an approximate search radius....
Read more >How to see activity history that may have caused a Windows ...
How to see activity history that may have caused a Windows crash or restart?
Read more >App crash in android Q(Activity top position already set to ...
The app's initial activity is coming up and showing as expected. Now, when pressing a button to bring up a second activity on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@hrishikesh-kadam @lekhrajtiwari So I found the issue. The source of the problem is at com.folioreader.ui.folio.activity.SearchActivity.init(SearchActivity.kt:113)
“SearchActivity.java” was created when I added a search functionality to my app. I simply renamed the activity and the related “activity_search.xml” file and now it’s working again.
Thanks guys
Must be a different case. Good to know that there’s another solution.