I want to run android studio in fedora 25.
I run ./studio.sh
and I get this error:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m;support was removed in 8.0
No protocol specified
Start Failed: Internal Error. Failed to initialize graphics environment
java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:1043)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361)
at javax.swing.text.StyleContext.reclaim(StyleContext.java:454)
at javax.swing.text.StyleContext.addAttribute(StyleContext.java:311)
at javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:578)
at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1501)
at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1312)
at javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:1259)
at javax.swing.text.StyleContext.addStyle(StyleContext.java:107)
at javax.swing.text.StyleContext.<init>(StyleContext.java:87)
at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:166)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:391)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:98)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:113)
any idea how to fix this problem? I tried to unset Display or export Display:=0 and I did not get any solution
Fedora 25 is not using XOrg anymore by default. We moved to Wayland and Java probably does not handle that. It would be nice to report the problem to Android Studio developers (not here).
Anyway, you can workaround it by running Fedora using old X. Select the "GNOME on XOrg when logging into your account:
I got the below issue because of running as a root user. Once I exit from the root user and tried ./studio.sh it worked perfectly :)
Start Failed: Internal Error. Failed to initialize graphics environment
I got this issue because I was running as root user. This will work fine if you don't change your privilege to the super user
Related
I upgraded android studio and I get this weird behaviour
when I run my unit tests they run and complete correctly (I introduced some errors to make sure it was so)
but when I put a breakpoint and use debug tests in java the jvm crashes with this error:
"C:\Program Files\Android\Android Studio4\jre\bin\java.exe" - agentlib:jdwp=transport=dt_socket,address=127.0.0.1:64493,suspend=y,server=n -ea -javaagent:C:\Users\imavrelos\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlinx\kotlinx-coroutines-core-jvm\1.3.9\4be434f5e86c1998a273e7f19a7286440894f0b0\kotlinx-coroutines-core-jvm-1.3.9.jar -Didea.test.cyclic.buffer.size=1048576 -javaagent:C:\Users\imavrelos\AppData\Local\Google\AndroidStudio4.1\groovyHotSwap\gragent.jar -javaagent:C:\Users\imavrelos\AppData\Local\Google\AndroidStudio4.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Android\Android Studio4\lib\idea_rt.jar" com.intellij.rt.execution.CommandLineWrapper C:\Users\imavrelos\AppData\Local\Temp\idea_classpath1657759720 com.intellij.rt.junit.JUnitStarter -ideVersion5 #w#C:\Users\imavrelos\AppData\Local\Temp\idea_working_dirs_junit.tmp #C:\Users\imavrelos\AppData\Local\Temp\idea_junit.tmp -socket64492
Connected to the target VM, address: '127.0.0.1:64493', transport: 'socket'
java.lang.NoClassDefFoundError: kotlin/collections/AbstractMutableMap
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at kotlinx.coroutines.debug.internal.DebugProbesImpl.<clinit>(DebugProbesImpl.kt:30)
at kotlinx.coroutines.debug.AgentPremain.<clinit>(AgentPremain.kt:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.ClassNotFoundException: kotlin.collections.AbstractMutableMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
... 20 more
FATAL ERROR in native method: processing of -javaagent failed
Disconnected from the target VM, address: '127.0.0.1:64493', transport: 'socket'
Process finished with exit code 1
Exception in thread "main"
has anyone got this error? any suggestions on how to fix it?
I fixed it by editing the current Run/Debug Configuration and choosing JAR Manifest in the Shorten command line option.
A similar error can also be caused by using kotlinx-coroutines-core, but it seems to depend on the IDEA version or library.
In my case, debug stopped working after updating IDEA Ultimate to version 2021.2
I fixed this error by editing the current Run/Debug Configuration and disabling the "Shorten command line" option. Before it was set to "classpath file" which seems to bring up the above error in some cases.
I wrote a unit test for a library. When running with usual Ctrl + Shift + F10 it executed, but when tried to debug the test, it didn't run with the error: 'Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/collections/AbstractMutableMap'.
Then I moved the unit test to instrumentation test.
If you are facing this issue in a web-based Gradle project and you are not utilizing kotlin in your project, In that case following steps could help you out:
Check checkbox for 'disable coroutine agent'
File > Settings > Build, Execution, Deployment > Debugger > Data Views
Kotlin > Disable coroutine agent
When I start Android Studio this problem was happened. I tried to re-install android studio, restart window, but It didn't work
java.io.FileNotFoundException: C:\Users\sev_user\.AndroidStudio2.3\system\port (Access is denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1285)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1279)
at com.intellij.openapi.util.io.FileUtil.writeToFile(FileUtil.java:1264)
at com.intellij.idea.SocketLock.lambda$lock$1(SocketLock.java:156)
at com.intellij.idea.SocketLock.underLocks(SocketLock.java:180)
at com.intellij.idea.SocketLock.lock(SocketLock.java:129)
at com.intellij.idea.StartupUtil.lockSystemFolders(StartupUtil.java:296)
at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:124)
at com.intellij.idea.MainImpl.start(MainImpl.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.plugins.PluginManager.lambda$start$0(PluginManager.java:91)
at java.lang.Thread.run(Thread.java:745)
Delete port.lock file uinder C:\Users....AndroidStudio2.3\config\
And restart the android studio.
The file will be recreated on studio launch
And check for
C:\Users\sev_user.AndroidStudio2.3\system\port .if it is hidden make it visible and allow universal permission for the file
Hope these two steps may solve your problem
The error is pretty clear:
C:\Users\sev_user.AndroidStudio2.3\system\port (Access is denied)
The account that launches Android Studio is missing the permissions necessary to access the required file. You should carefully check the NTFS permissions set on C:\Users\sev_user\.AndroidStudio2.3\system\ and C:\Users\sev_user\.AndroidStudio2.3\system\port.
happened to me too,
solved it by Installing newer version of Java JDK.
Hope it works for you too :)
I started using Android Studio after a couple of days, Suddenly Android Studio didn't start . When I started it through terminal i.e "Studio" Command. Got the Following Error.
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Start Failed: Internal Error. Please report to https://https://code.google.com/p/android/issues
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:103)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk1.8.0_91/jre/lib/i386/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:97)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
... 6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.awt.Component.<clinit>(Component.java:593)
at com.intellij.idea.Main.showMessage(Main.java:336)
at com.intellij.idea.Main.showMessage(Main.java:312)
at com.intellij.idea.Main.showMessage(Main.java:291)
at com.intellij.idea.Main.main(Main.java:106)
I have re-installed java 7 and java 8 both . Also Reinstalled Android Studio. But still there was no help.
I had installed octave before, was that a problem?
To resolve the problem you should install JDK 64bit. From the comments, you have installed 32-bit JDK
I was having the same issue. I killed the app and reopened. It fixed the issue for me.
I install an Android develop environment in ubuntu15,after installing JDK,and SDK tools,run studio.sh,it reports some error info:
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Start Failed: Internal Error. Please report to https://code.google.com/p/android/issues
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:92)
Caused by: java.lang.UnsatisfiedLinkError: /home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so: libXtst.so.6:
cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1842)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:96)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:72)
... 6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.awt.Component.<clinit>(Component.java:593)
at com.intellij.idea.Main.showMessage(Main.java:248)
at com.intellij.idea.Main.showMessage(Main.java:234)
at com.intellij.idea.Main.showMessage(Main.java:224)
at com.intellij.idea.Main.main(Main.java:95)
but libawt_xawt.so, libXtst.so.6 have existed,PATH has been set
$ locate libawt_xawt.so
/home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so
$ locate libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
$ echo$PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/xhk/java/jdk1.8.0_60/bin:/home/xhk/java/jdk1.8.0_60/jre/bin:/home/xhk/android/android-sdk-linux:/home/xhk/android/android-sdk-linux/tools:/home/xhk/android/android-sdk-linux/platform-tools
How can i fix it? o.0
You seem to have installed the 32 bit version of the java SDK as indicated by this line:
/home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so
But your system is a 64 bit system as indicated by these lines
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
There are two solutions. The first is to install the 64 bit version of the java jdk. The second is to install the 32 bit version of the libXtst
sudo apt-get install libxtst6:i386
I would prefer the first option
I opened my Android Studio today and it asked to upgrade to the latest version which I did.
Now I am unable to create a new project. I follow the wizard to create a project and it finishes with creating the project, but the result is not what I expected and I get a error in the console
The error I get is:
Can't deserialize target data of key 'IdeaAndroidProject'. Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]: Can't deserialize target data of key 'IdeaAndroidProject'. Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]
java.lang.IllegalStateException: Can't deserialize target data of key 'IdeaAndroidProject'. Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]
at com.intellij.openapi.externalSystem.model.DataNode.prepareData(DataNode.java:159)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.ensureTheDataIsReadyToUse(ProjectDataManager.java:110)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:80)
at com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportBuilder$1$1$1.run(AbstractExternalProjectImportBuilder.java:140)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:314)
at com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportBuilder$1$1.run(AbstractExternalProjectImportBuilder.java:137)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$6$1.run(ExternalSystemApiUtil.java:323)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1002)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil$6.run(ExternalSystemApiUtil.java:320)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2003)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeOnEdt(ExternalSystemApiUtil.java:340)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:318)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:314)
at com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportBuilder$1.run(AbstractExternalProjectImportBuilder.java:134)
at com.intellij.ide.startup.impl.StartupManagerImpl$7.run(StartupManagerImpl.java:286)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivities(StartupManagerImpl.java:259)
at com.intellij.ide.startup.impl.StartupManagerImpl.access$100(StartupManagerImpl.java:52)
at com.intellij.ide.startup.impl.StartupManagerImpl$4.run(StartupManagerImpl.java:183)
at com.intellij.openapi.project.DumbServiceImpl.runWhenSmart(DumbServiceImpl.java:94)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.java:177)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4$2.run(ProjectManagerImpl.java:439)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:514)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.InvalidClassException: com.android.build.gradle.internal.model.ArtifactInfoImpl; local class incompatible: stream classdesc serialVersionUID = 8019119530161366598, local class serialVersionUID = 4262527033625760143
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:570)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1599)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:979)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:478)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.readObject(ProtocolToModelAdapter.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:979)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at com.intellij.openapi.externalSystem.model.DataNode.prepareData(DataNode.java:155)
... 37 more
When I try to import it does the same thing.
I must ask you for your Android Studio Build number and your system environment. But I think the following step may help. And sorry for poor English if there is any spell mistake.
Under Windows 7 x64
Android Studio 130.737825
First,check your Android Studio version . I have the problem when the version is 130.737825 . Anyway update Android Studio. "Help->Check for Update"
if it didn't work.
http://tools.android.com/recent
to check the newest Build Number or
http://dl.google.com/android/studio/patches/updates.xml
check the newest version .
Download Update package
like this one https://dl.google.com/android/studio/patches/AI-130.737825-132.821530-patch-win.jar
Please according to your own situation choose to down the right one. The format is AI-$FROM-$TO-patch-win.jar $From is the build number your Android studio. $TO is the newest build number you want to update.
Download the package to your Android Studio directory. D:\Android\android-studio.
Run cmd
D:\Android\android-studio>java -classpath AI-130.737825-132.821530-patch-win.jar com.intellij.updater.Runner install .
Moving my projects to the same partition as my Android Studio seems to have solved my problem.
Not a permanent solution but if you want to continue with your work before they fix it, you've got to do it...
I have this error, is your user folder located on a drive other than where android studio is installed?
I would've put this as a comment but can't.
I had the same issue on Win7-x64. I had put path to jdk (c:\Program Files\Java\jdk1.7.0_40) for JAVA_HOME (goto Control Panel->System->Environment Variable) in double quotes. Removing the quotes fixes the issue.
On Ubuntu 13.10 x86_64, updating (to v. 0.3.1 at the time of this writing) also fixed the problem.
To update, as some already listed, just click on "Help -> Check for Update".
As shell said:
WARNING: You are launching the IDE using OpenJDK Java runtime.
ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES!
SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS!
NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed
please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
See http://www.jetbrains.com/help/phpstorm/installation-guide.html?section=Windows#h2linux for more info on switching default JDK.
I think this is the problem. You must switch android-studio's jdk to the right path.