Reputation: 424
Whenever I go to the design tab of an XML file, the preview is completely blank. Even when I try to put components it does not visually show up. Below is a link to an example.
I tried to resync with Gradle files, invalidate catches and restart and even reinstalled Android Studios, but nothing works.
What should I do?
Edit: Somehow by changing the api values next to AppTheme on top it works. But it leads to another problem: none of the attributes are showing up. Is there another fix to this? I tried another invalidate and restart with no success.
Attribute side is completely blank
Upvotes: 0
Views: 231
Reputation: 337
Check the theme you have selected is right or not. In my case i solved the issue by changing the theme by noactionbar that I have used in menifest for this activity.
Upvotes: 0
Reputation: 2521
if you are using build gradle version 28,
in build.gradle file depencies using "28.0.0"
just change it to
28.0.0-alpha1
it wil solve the problem hopefully.
Upvotes: 1
Reputation: 113
Just go to styles.xml and change this:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
to
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
Hope it will help.
Upvotes: 0
Reputation: 1730
Please check if in your project is using any support library that is RC
or beta
. If you are using an RC or beta, try a downgrade.
Another thing you could try is to downgrade also your compileSdkVersion
and targetSdkVersion
and rebuild your project.
Hope it helps.
Upvotes: 0