Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preview tab is not visible in Android Studio

I have installed an android studio and tried to create my first project. But preview tab is not visible. I checked it in the View -> Tools Window but the preview is also not present there.

Even Design/Text tab is not visible in the android studio. I checked the earlier posts in stackoverflow but have not been able to resolve this problem. Like this one : Where is Android Studio layout preview?

Not able to show you the image as this is my first question and I have only 1 reputation. :(

Please suggest a way to find it.

Thanks in advance

like image 866
Sumit Avatar asked Jan 15 '14 14:01

Sumit


People also ask

Where is the preview pane in Android Studio?

Navigate to file -> Project structure -> modules -> click on green plus button to add a module. Now you will be able to see the full project structure; then open the module form project window (the left panel), select res then select layout -> your layout name(. xml).

Why layout is not showing in Android Studio?

It depends on your version. Here is a better way: open project and right click on app then go to open module settings click on dependencies tab and then click + icon on right then click 1st option which is library dipendency choose your dependencies click ok.


2 Answers

As per the screenshot your project structure is not as per it should be. Reason is clearly visible in the picture, Your SDK buttons in tool bar are grayed in screen shot that means there is some problem in the SDK path.

please set your SDK path from

 File > Project Structure > Android SDK

And after that sync your project with gradle using the tiny gradle button available in tool bar.

Not even the preview, you will not see any android specific tabs if your sdk path is not correct.

For reference your studio will look like this after correct sdk

studioscreenshot

like image 114
Piyush Agarwal Avatar answered Oct 03 '22 03:10

Piyush Agarwal


I had the problem of not seeing a preview tab, or the design and text tab. After playing around with it for a while I found that the problem was that my Gradle was messed up. I went to the Gradle Console (bottom right corner of the screen) and opened it. I asked me to import Gradle project (the one I was working on) and it worked. Sorry if that doesn't make sense, I am very new to Android Studio

like image 39
M Hammond Avatar answered Oct 03 '22 01:10

M Hammond