I installed Android Studio, but when I edit my layout files, I can't find live preview! I just see an XML file. How can I see my layout in graphical view?
Update: This is how it looks like in my case:
I installed Android Studio, but when I edit my layout files, I can't find live preview! I just see an XML file. How can I see my layout in graphical view?
Update: This is how it looks like in my case:
Got the same problem after importing my Eclipse ADT project to Android Studio. Text and Desing tabs where missing.
Found my Event Log windows reads "Frameworks detected: Android framework is detected in the project Configure"
I click the hyperlink provided and everything was fixed, Text and Desing tabs became visible and functional
I had this problem a couple hours ago when I exported my projects from Eclipse to Android Studio. Unfortunately, the top answers here didn't work for me.
Anyway, creating a new project instead of opening an old one did the trick for me as what Thomas Kaliakos mentioned on his comment here
first of all after creating the new app
go to java->MainActivity
and open a new tab for it
In the java code click on the index numberings where you can see the code logo
as red circled in picture
left click on it and you will see two options as shown in below picture
click on the first option so that you can preview your app in android studio
Select MainActivity.java file from the left pane, as shown in the red colored rectangle.
Left click the XML Tag icon as shown in the red colored circle.
Select the "activity_main.xml(layout)" option shown highlighted in the below figure.
In case that helps anyone, I had the same issue today where the 'design / text' tabs were missing. I had switched to the dark theme and thought maybe that was the issue, so went back to Preferences / Appearance (under IDE settings) switched back to Default Theme, and that reset everything correctly for me. I could also then switch again to Darcula theme and the tabs were still there, so seems like switching themes is a way to reset the IDE windows/tabs.
Several people seem to have the same problem. The issue is that the IDE only displays the preview if editing a layout file in the
res/layout*
directory of an Android project.In particular, it won't show if editing a file in
build/res/layout*
since those are not source directory but output directory. In your case, you are editing a file in thebuild/
directory...The Resource folder is set automatically, and can be viewed (and changed) in Project Structure > Modules > [Module name] > Android > Resources directory.