Reputation: 2753
I'm using 1.4. I've tried to uninstall and reinstall again. still same problem. any solution?
Upvotes: 10
Views: 12280
Reputation: 91
Go to app-res-values->styles.xml then; Change,
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
to
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
this worked for me.
Upvotes: 9
Reputation: 13914
In my situation there was a silent error in my activity .xml file.
I accidentally positioned an item outside of my GridLayout
(the child's layout_row
/layout_column
was too high). I'd expect Android Studio to report mistakes like this, but instead the design view just stops working.
So if your design view stops working and the other answers don't help, you might have an unreported error in your .xml file.
Upvotes: 1
Reputation: 2288
Steps
Clean project
Build project
Close .xml files
Reopen them
That worked for me
Upvotes: 1
Reputation: 1920
I just upgraded to Android Studio 1.5 and I ran into this same issue with new created projects. I tried invalidate the cache and rebuild the project. Sometimes that will fix the initial rendering, but any changes I make to the layout will not be reflected on the Design view.
The problem seems to be related to the embedded layout mechanism. After creating a new project (with Blank Activity), I got content_main.xml
to display by removing the line tools:showIn="@layout/activity_main"
. Similarly, remove <include layout="@layout/content_main"/>
from activity_main.xml
and the Design view should render properly.
Upvotes: 4
Reputation: 411
Did you try to remove android studio cache folders after uninstalling? they located on
C:\Users\<username>\.android
, ..\.AndroidStudio1.4
, ..\.gradle
.
And then try to install studio again
Upvotes: 2
Reputation: 2509
Try just building the project: Build -> Make Project
If that doesn't work try cleaning the project: Build -> Clean Project
That happened to me as well and all I had to do was build the project. Then it was able to render it.
Upvotes: 9