问题
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://imgur.com/a/OX3JNLk
回答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>
回答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.
来源:https://stackoverflow.com/questions/50844399/blank-screen-in-android-preview