9

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

Community
  • 1
  • 1
Sumit
  • 609
  • 3
  • 8
  • 15

2 Answers2

5

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

Piyush Agarwal
  • 25,608
  • 8
  • 98
  • 111
  • You are right. In project Structure, android sdk location was empty. Now I corrected the location :C:\Program Files\Android\android-studio\sdk. Then after that I synchronized the project with gradel. But still I am facing the same problem. Project structure is not as in the image you shared. Thanks for the reply. – Sumit Jan 15 '14 at 16:55
  • try to close studio and open it again. Make sure you have gradle 1.9 installed in your machine. – Piyush Agarwal Jan 15 '14 at 17:12
  • I have already upgraded the gradle to 1.9 and even tried reopening the android studio. But still the problem persists. – Sumit Jan 15 '14 at 17:42
  • Are you getting any error while syncing ? Post your build.gradle file also try to create a fresh new project. – Piyush Agarwal Jan 15 '14 at 17:46
  • creating a fresh new project worked. Now I am able to see preview tab and the directory structure got changed. Thanks for your help. :) – Sumit Jan 15 '14 at 18:26
1

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

M Hammond
  • 11
  • 1