0

So I have a problem with android studio. Mine "preview" is just a blank screen without content,that i actually added. When i run it on avd,i can see this button,and text view,unfortunetly the preview screen is still blank. I don't have any extra libraries,i reinstaled android studio couple of times and just created like ten new project - every case is ending same.

How it's look actually - https://i.stack.imgur.com/zScke.jpg

Trace
  • 5
  • 4
  • What does the event log say? – AguThadeus Jun 13 '18 at 19:06
  • You see that red info icon to the right corner of the preview section ? click that info button and there should be an option to refresh the preview. Hopefully that would resolve your problem – Tabish Hussain Jun 13 '18 at 19:08
  • that won't help. I just have some Render problem that says Failed to load AppCompat ActionBar with unknown error. @AguThadeus not much. 6/13/2018 9:20 PM Gradle sync started 9:20 PM Project setup started 9:20 PM Gradle sync finished in 2s 518ms (from cached state) – Trace Jun 13 '18 at 19:25
  • Please share your gradle app file – Red M Jun 13 '18 at 19:36
  • You may be using a buggy version of support libraries which leads to this problem, check [this](https://stackoverflow.com/questions/44449275/failed-to-load-appcompat-actionbar-with-unknown-error-in-android-studio) question and [this](https://stackoverflow.com/questions/47067706/failed-to-load-appcompat-actionbar-with-unknown-error-android-studio-3-0/47067754#47067754) as well, might be helpful – AguThadeus Jun 13 '18 at 19:43

2 Answers2

2

That may be a rendering problem. So you may try to change the app theme. Click on App Theme and select Holo Light then click Ok. Hope this would help you.

enter image description here

Sharon P Raju
  • 76
  • 1
  • 7
1

Update the build.gradle file so the "compileSdkVersion" and "targetSdkVersion" matches the version you are running your emulator.

For example

compileSdkVersion 26
buildToolsVersion '26.0.2'
targetSdkVersion 26
compile "com.android.support:support-v4:26.0.2"
compile "com.android.support:design:26.0.2

Also try some of the options mentioned here instead of preview, Android Studio showing only black screen with 'android...ActionBarOverlayLayout' written on it. Like Goto: src -> main -> res -> style.xml and add Base. to the style tag parent attribute.

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
...
</style>