Design view of Android studio is empty
Design view of Android studio is empty
I created a new project, and the design view is empty, anything I dragged into activity_main.xml
is not visible.
activity_main.xml
3 Answers
3
Please Fallow these steps
1- Go to your res folder and inside res folder.
2-Go to values.
3-Go to style.xml
4-change <!-- Base application theme. -->
<stylename="AppTheme"parent="Theme.AppCompat.Light.DarkActionBar">
to <stylename="AppTheme"parent="Base.Theme.AppCompat.Light.DarkActionBar">
thanks it worked for me.
– Usama Khan
Sep 6 '18 at 17:20
According to CoordinatorLayout is not visible in Design view, change versions of all android libraries to 28.0.0-alpha1
:
28.0.0-alpha1
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
I used to have a similar problem. Changing to a lower version of appcompat has solved this for me.
Go to build.gradle, under dependencies change
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
to
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
Then make sure to sync the project again. Good luck and happy coding.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
add dependency of gradle please
– Ashvin solanki
Sep 6 '18 at 16:01