0

I have encountered problems in android studio, I created a project with android studio, and then open the activity_main_dawer.xml file in the menu directory, it will report an error, the error message is as follows, I tried the Clean Project and Rebuild project, the error still exists, How to solve? Thank you.

null
java.lang.NullPointerException
    at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager.getRenderResult(LayoutlibSceneManager.java:602)
    at com.android.tools.idea.uibuilder.surface.ScreenViewBase.getResult(ScreenViewBase.java:109)
    at com.android.tools.idea.uibuilder.surface.ScreenView.getResult(ScreenView.java:30)
    at com.android.tools.idea.uibuilder.menu.NavigationViewSceneView.getPreferredSize(NavigationViewSceneView.java:64)
    at com.android.tools.idea.common.surface.SceneView.getPreferredSize(SceneView.java:95)
    at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager.createSceneViewsForMenu(LayoutlibSceneManager.java:265)
    at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager.doCreateSceneView(LayoutlibSceneManager.java:234)
    at com.android.tools.idea.common.scene.SceneManager.createSceneView(SceneManager.java:73)
    at com.android.tools.idea.common.scene.SceneManager.<init>(SceneManager.java:66)
    at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager.<init>(LayoutlibSceneManager.java:157)
    at com.android.tools.idea.uibuilder.surface.NlDesignSurface.createSceneManager(NlDesignSurface.java:145)
    at com.android.tools.idea.common.surface.DesignSurface.setModel(DesignSurface.java:281)
    at com.android.tools.idea.common.editor.NlEditorPanel.initNeleModelOnEventDispatchThread(NlEditorPanel.java:143)
    at com.android.tools.idea.common.editor.NlEditorPanel.lambda$null$4(NlEditorPanel.java:139)
    at com.intellij.openapi.project.DumbServiceImpl.lambda$smartInvokeLater$7(DumbServiceImpl.java:366)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
  • its a nullpointerexception.... over here this shows `null java.lang.NullPointerException`.. ....some thing is null in your code....can you please paste more code that I can understand where its wrong – lllllllllllllll Jul 21 '18 at 11:08
  • can you post navigationDrawer activity ....so I can see where is the problem....the error you posted just shows what is error but to know where it is coming from ..I need to see – lllllllllllllll Jul 21 '18 at 12:08

0 Answers0