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
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).
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.
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
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
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