Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Null in API version Android Studio preview

I updated from Android Studio 2.3 to 3.0 and now none of the previews on the XML editors are shown.

I can see a null in the top bar in the API level selector and it does not give me any option to pick

enter image description here

enter image description here

Any possible solution for that?

I tried Invalidate cache and restart but it does not seem to help.

like image 412
codeKiller Avatar asked Nov 13 '17 08:11

codeKiller


People also ask

How do I know my Android API version?

Tap the "Software Information" option on the About Phone menu. The first entry on the page that loads will be your current Android software version.

Where is Build Tools version in Android Studio?

Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the <sdk>/build-tools/ directory.

How do I make my Android device version programmatically?

This example demonstrates how do I retrieve android API version programmatically. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml.


2 Answers

Just press "Sync Project with gradle" and enjoy :) Sync icon is present in the toolbar enter image description here

like image 70
Andrew F Avatar answered Sep 20 '22 21:09

Andrew F


I resolve this isuue by Syncing Project with gradle files.

In android studio from top toolbar.

choose first File option and click option Sync Project with gradle files.

thanks.

like image 43
mehmoodnisar125 Avatar answered Sep 22 '22 21:09

mehmoodnisar125