Exception in editor mode (preview not work)
See original GitHub issueThe following classes could not be instantiated: - com.prolificinteractive.materialcalendarview.MaterialCalendarView
java.lang.NullPointerException
at com.prolificinteractive.materialcalendarview.MaterialCalendarView.setupChildren(MaterialCalendarView.java:425)
at com.prolificinteractive.materialcalendarview.MaterialCalendarView.<init>(MaterialCalendarView.java:404)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:401)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:184)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:142)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:229)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:421)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:432)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:336)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:863)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:327)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:386)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:193)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:450)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$3(RenderTask.java:590)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Error with Preview when logged in through Active Directory
Logging into Sitecore works just fine and I'm able to open up and use Experience Editor as normal. Whenever I try to launch...
Read more >Preview error in edit mode for media - Optimizely World
Well, I believe Episerver edit mode is using ASP.net cookie based session to work , looking at the config I see <sessionState mode="InProc" ......
Read more >VS 2022 Preview 2, An error occurred while loading the ...
Close VS and VS with safe mode: open CMD and go to C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE folder, run the command: devenv ...
Read more >Is Google Tag Manager Preview Mode Not Working? 22 Ways ...
After some time, he completes the task, but something's not right here – Preview and Debug console still does not appear after you...
Read more >Ribbon control exception during page preview - Stack Overflow
I was experiencing the same issue in Sitecore 7 in page edit mode. ... and rebuilt the link database, but those didn't seem...
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
Same here (edit) i solved problem for me, using version 1.6.0 instead of 2.0.1, curiously 1.6.1 and above not works (had the same problem)
So, I discovered the fix on the Design Editor problem.
I downloaded the source code and opened up Android Studio. Then I tried to separate the calendarMode variable from the state builder, then instantiate it like this;
calendarMode = CalendarMode.values()[calendarModeIndex];
Then I built the project, and a
org.threeten.bp.zone.ZoneRulesException: No time-zone data files registered
occurred, and googled about that exception and found this.After finding the answer, adding the missing statement, and returning the state builder back. A new exception popped up (As of writing this, it didn’t occurred, but it did happened);
java.lang.NullPointerException
at com.prolificinteractive.materialcalendarview.TitleChanger.change(TitleChanger.java:59)
So I tried to add a
!= null
on the if statement, and it worked!I don’t know if this is breaking the license or something, but alot of people including me is having this problem, but I’m not gonna use my version of the library and I’m gonna wait for the update.