Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDE Error ocurred Android Studio 3.1

Error Description Loading Build Code of the activity main drawer

Greetings, after updating my Android Studio to the version 3.1, I have a problem with the menu section (Navigation Drawer), the preview is not working and it throws an error "IDE error ocurred". When I click on the error icon residing at the right bottom corner of my IDE, I get the following:

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)
like image 233
Estharlin Abreu Avatar asked Mar 31 '18 02:03

Estharlin Abreu


People also ask

What is IDE error?

IDE Error messages can also appear after an attempt to upgrade or swap an IDE drive with another drive not specifically made for the computer. The error may occur due to an incorrect ;master/slave setting on the drive, or for other reasons.

Can I use Android Studio as IDE?

Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA .

What is Android official IDE?

Android Studio is the official integrated development environment (IDE) for Android application development. It is based on the IntelliJ IDEA, a Java integrated development environment for software, and incorporates its code editing and developer tools.

How do I resolve an IDE error in Android Studio?

, Web Developer at R and D Infotech, Jaipur. For Resolving An IDE error in Android Studio, follow these steps: Go to location in C:Program filesAndroidAndroid Studiobinidea.properties. 2.Open the idea.properties file via any text editor. Add the following code to disable.android.first.run=true.

Why doesn’t Android Studio start after installing Android Studio?

Android Studio doesn’t start after installing version 4.2 Studio tries to import previous.vmoptions and sanitize them to work with the garbage collector used by JDK 11. If that process fails, the IDE may not start for certain users who set custom VM options in the.vmoptions file.

How to fix Android Studio run configuration error?

android studio Run Configuration Error: Broken configuration due to unavailable plugin or invalid configuration data. Solution: Make sure android support plugin is checked in plugins section under preferences.

Why is my IntelliJ button not working in Android Studio?

This is a known issue in the version of IntelliJ that Android Studio 4.0 is built on (see issue IDEA-228450 ). To resolve this issue, revert any customizations you have made to those buttons as follows: Select File > Settings (or Android Studio > Preferences on macOS).


1 Answers

I have faced the same problem.

I copied the source code from the file activity_main_drawer.xml and deleted it.

So, I created a new "Menu resource file" with the same name (activity_main_drawer.xml) and put inside it the source code that I had copied.

It worked for me...

like image 75
user9916024 Avatar answered Nov 03 '22 21:11

user9916024