Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My design view on Android Studio is blank. It doesn't change. I have tried syncing with gradle build too. What to do?

Tags:

enter image description here

XML CODE:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<TextView
    android:layout_width="34dp"
    android:layout_height="53dp"
    android:text="Hello World!"
    android:textAppearance="@style/TextAppearance.AppCompat"
    android:visibility="visible" />

</LinearLayout

Need help asap.What to do??

like image 537
Nikhil Chaudhary Avatar asked Jun 13 '18 05:06

Nikhil Chaudhary


2 Answers

I had the same problem yesterday after updating android studio, Go to Gradle Scripts -> Build.Gradle(Module:app)

Gradle

change alpha3 to alpha1

        implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'

to

        implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

Image

Note: [Edit] This solution doesn't work anymore as version codes have been updated, stable version has been released

like image 110
Praveen G Avatar answered Sep 18 '22 07:09

Praveen G


Just building the project: Build -> Make Project

If that doesn't work try cleaning the project: Build -> Rebuild and 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.

like image 27
Dnyaneshwar Panchal Avatar answered Sep 19 '22 07:09

Dnyaneshwar Panchal