Why won't anything show up in “Design” (Android Studio)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Why won't anything show up in “Design” (Android Studio)



I'm not sure what to do here. I'm pretty new to Android Studio and I'm supposed to see something like this:



(I can't post pictures, but if you go to https://developer.android.com/training/basics/firstapp/building-ui it's figure 3)



But what I see is an empty blue rectangle where I'm supposed to have the squiggle arrows and "Hello World!" I didn't see the "Hello World!" when I had the original template, either. Also, I clicked the "magic wand" thing that infers constraints, but that hasn't worked.





Are you getting any error msg? Xml preview shows blank when the gradle wont sync successfully.This happens when you have any error in code or error in .gradle file.
– Arjun
Aug 10 at 3:37





Possible duplicate of Android Studio emulator not showing widgets
– Michael Hathi
Aug 10 at 5:34




3 Answers
3



I was having the same issue .



Just open your gradle file (app level) and set


compileSdkVersion to 27

targetSdkVersion to 27



And in your dependencies (in the same file) there will be a version 28.0.0 alpha-3



Replace that with 27.1.1 without the alpha-3



It will work



change your style.xml



from



parent="Theme.AppCompat.Light.DarkActionBar"


parent="Theme.AppCompat.Light.DarkActionBar"



into



parent="Base.Theme.AppCompat.Light.DarkActionBar"


parent="Base.Theme.AppCompat.Light.DarkActionBar"



and build the project again.



Remove the last two lines of gradel files that are Test dependency
and then add dependency of test runner from



File - >project structure - >app -> dependency - > test runner
(dependency)



and then change it to debug implementation.
I faced the same issue earlier so I tried this and got the result.
And change the compiled SDK versions dependency from 28.0.0 to 27.1.1


debug implementation.


change the compiled SDK versions dependency from 28.0.0 to 27.1.1






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.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard