android stuido 升级到2.3版本是的时候,启动总是提示
Unexpected exception during symbol building (rebuildModuleMaps)
java.lang.NullPointerException
at com.jetbrains.cidr.lang.workspace.OCWorkspaceManager.getWorkspace(OCWorkspaceManager.java:12)
at com.jetbrains.cidr.modulemap.symbols.ModuleMapCacheBuilder.getHeaderRoots(ModuleMapCacheBuilder.kt:39)
at com.jetbrains.cidr.modulemap.symbols.ModuleMapCacheBuilder.getTasks(ModuleMapCacheBuilder.kt:19)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.lambda$buildModuleMapsInternal$5(OCSymbolTablesBuildingActivity.java:139)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:848)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.buildModuleMapsInternal(OCSymbolTablesBuildingActivity.java:138)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.lambda$rebuildModuleMaps$4(OCSymbolTablesBuildingActivity.java:129)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$1.performInDumbMode(OCSymbolTablesBuildingActivity.java:180)
at com.intellij.openapi.project.DumbServiceImpl.lambda$runSingleTask$10(DumbServiceImpl.java:474)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.project.DumbServiceImpl.runSingleTask(DumbServiceImpl.java:467)
at com.intellij.openapi.project.DumbServiceImpl.access$300(DumbServiceImpl.java:52)
at com.intellij.openapi.project.DumbServiceImpl$4.run(DumbServiceImpl.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
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)
java.lang.NullPointerException
at com.jetbrains.cidr.lang.workspace.OCWorkspaceManager.getWorkspace(OCWorkspaceManager.java:12)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.clearAllSymbolDependentCaches(OCSymbolTablesBuildingActivity.java:395)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.access$100(OCSymbolTablesBuildingActivity.java:49)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$3.run(OCSymbolTablesBuildingActivity.java:255)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$10$1.run(OCSymbolTablesBuildingActivity.java:434)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$10.run(OCSymbolTablesBuildingActivity.java:430)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:631)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
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)
java.lang.NullPointerException
at com.jetbrains.cidr.lang.workspace.OCWorkspaceManager.getWorkspace(OCWorkspaceManager.java:12)
at com.jetbrains.cidr.modulemap.symbols.ModuleMapCacheBuilder.getHeaderRoots(ModuleMapCacheBuilder.kt:39)
at com.jetbrains.cidr.modulemap.symbols.ModuleMapCacheBuilder.getTasks(ModuleMapCacheBuilder.kt:19)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.lambda$buildModuleMapsInternal$5(OCSymbolTablesBuildingActivity.java:139)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:848)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.buildModuleMapsInternal(OCSymbolTablesBuildingActivity.java:138)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.lambda$rebuildModuleMaps$4(OCSymbolTablesBuildingActivity.java:129)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$1.performInDumbMode(OCSymbolTablesBuildingActivity.java:180)
at com.intellij.openapi.project.DumbServiceImpl.lambda$runSingleTask$10(DumbServiceImpl.java:474)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.project.DumbServiceImpl.runSingleTask(DumbServiceImpl.java:467)
at com.intellij.openapi.project.DumbServiceImpl.access$300(DumbServiceImpl.java:52)
at com.intellij.openapi.project.DumbServiceImpl$4.run(DumbServiceImpl.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
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)
java.lang.NullPointerException
at com.jetbrains.cidr.lang.workspace.OCWorkspaceManager.getWorkspace(OCWorkspaceManager.java:12)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.clearAllSymbolDependentCaches(OCSymbolTablesBuildingActivity.java:395)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity.access$100(OCSymbolTablesBuildingActivity.java:49)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$3.run(OCSymbolTablesBuildingActivity.java:255)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$10$1.run(OCSymbolTablesBuildingActivity.java:434)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
at com.jetbrains.cidr.lang.symbols.symtable.OCSymbolTablesBuildingActivity$10.run(OCSymbolTablesBuildingActivity.java:430)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:631)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
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)
在网上找了些资料:
Finally, I noticed that the exception window shows the NPE comes from the NDK support plugin. So I disabled and restarted AS to enable the plugin and the NPE is gone! Moreover, the C++ Code Style also comes back to normal. Therefore both should be somewhat related. Anyway, it would be useful to add a note for people to upgrade to 2.2.x.
大概意思是禁用android studio插件NDK 。如下
file>settings>plugins