Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDE Error when creating a new activity in android studio 3.0.1

I am having problems to create new activities in Android Studios 3.0.1 for Windows 10, the issue is that until yesterday everything worked, but now it throws errors when trying to create a new activity and then, do not create it.

Only create classes, or empty activities, but no other that appears in the gallery.

The error message is:

Inconsistent FILE tree in SingleRootFileViewProvider{myVirtualFile=LightVirtualFile: \targetFile, content=VirtualFileContent{size=69}}; nodeLength=137; fileLength=69

First Error Window

Second Error Window

I've done everything, I've downloaded the latest version of gradle and I've reinstalled Android Studio, several times.

like image 424
Carlos Quintero Avatar asked Jan 21 '18 02:01

Carlos Quintero


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.

Why Android studio is not opening?

If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.


2 Answers

It's a known bug: https://youtrack.jetbrains.com/issue/KT-22349

Problem: Create new Activity in Android Studio from Gallery

Android Studio: Android Studio 3.0.1. (MacOS and Windows)

Recent Update: I had recently updated to the newest update of Kotlin plugin Version: 1.2.20-release-Studio3.0-1.

Solution that worked for me: I turned off Kotlin plugin in Android Studio -> Plugins -> Kotlin and restarted Android Studio. The problem was gone.

On turning on Koltin plugin again the problem came back as well.

Update: The issue is resolved in the latest update v-1.2.21 - If you don't see it in Android Studio under plugins then download directly from the website: https://plugins.jetbrains.com/plugin/6954-kotlin

like image 173
Sharj Avatar answered Oct 03 '22 17:10

Sharj


EDIT (27/01/2018) : The issue have been fixed by Jetbrains. Just update your Kotlin plugin.


As @Sharj said, it is a known bug.

The first solution is to disable the Kotlin plugin : Files > Settings > Plugins and unckeck Kotlin.

--

But if you need to use the plugin, you have to downgrade it to version 1.2.10.

To do so download the 1.2.10 plugin archive on the Jetbrain Plugin Repository corresponding to your Android Studio version. For me it is 1.2.10-release-Studio3.0-1.

Then install it : Files > Settings > Plugins and select Install plugin from disk.... Choose your 1.2.10-release-Studio3.0-1.zip archive you just downloaded and then restart Android Studio.

like image 34
hg8 Avatar answered Oct 03 '22 17:10

hg8