我无法为一个非常着名的错误创建一个AVD:“创建AVD时出错。在创建AVD时发生错误。请参阅idea.log获取详细信息”与Anfroid Studio 3.3.2和Ubuntu 18.04。
我尝试了stackoverflow上的所有解决方案,不仅但没有成功。
我附上了idea.log文件的错误和警告部分:
2019-03-27 11:07:28,756 [d thread 5] WARN - vdmanager.AvdManagerConnection - java.nio.file.AccessDeniedException: /home/danielemod/.android/avd/Nexus_5X_API_28.ini
2019-03-27 11:10:57,530 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - @NotNull method com/android/tools/idea/avdmanager/AvdOptionsModel.getCreatedAvd must not return null
java.lang.IllegalStateException: @NotNull method com/android/tools/idea/avdmanager/AvdOptionsModel.getCreatedAvd must not return null
at com.android.tools.idea.avdmanager.AvdOptionsModel.$$$reportNull$$$0(AvdOptionsModel.java)
at com.android.tools.idea.avdmanager.AvdOptionsModel.getCreatedAvd(AvdOptionsModel.java:796)
at com.android.tools.idea.avdmanager.CreateAvdAction.actionPerformed(CreateAvdAction.java:44)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6548)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:817)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:394)
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)
2019-03-27 11:10:57,532 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - Android Studio 3.3.2 Build #AI-182.5107.16.33.5314842
2019-03-27 11:10:57,532 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_152-release
2019-03-27 11:10:57,532 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2019-03-27 11:10:57,532 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
2019-03-27 11:10:57,532 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - OS: Linux
2019-03-27 11:10:57,532 [entQueue-0] ERROR - llij.ide.plugins.PluginManager - Last Action: Android.RunAndroidAvdManager
2019-03-27 11:11:52,979 [d thread 5] WARN - dea.sdk.SystemInfoStatsMonitor - CpuInfoFlags.fromExitCode(): unknown flag values '0x80'
通过使用终端命令解锁ANDROID文件夹访问解决:sudo chown [USER NAME] .android
解决方案发现于:qazswpoi