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.
Open Start menu > Computer > System Properties > Advanced System Properties In the Advanced tab > Environment Variables. Add new system variable JAVA_HOME that points to JDK folder, C:\Program Files\Java\jdk1. 7.0_13\
If you don't have a project opened, Android Studio shows the Welcome screen, where you can create a new project by clicking Start a new Android Studio project. If you do have a project opened, create a new project by selecting File > New > New Project from the main menu.
To install Android Studio on your Mac, proceed as follows: Launch the Android Studio DMG file. Drag and drop Android Studio into the Applications folder, then launch Android Studio. Select whether you want to import previous Android Studio settings, then click OK.
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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With