Reputation: 51
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??
Upvotes: 5
Views: 1400
Reputation: 984
I had the same problem yesterday after updating android studio, Go to Gradle Scripts -> Build.Gradle(Module:app)
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'
Note: [Edit] This solution doesn't work anymore as version codes have been updated, stable version has been released
Upvotes: 3
Reputation: 444
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.
Upvotes: 1
Reputation: 880
Use this code, it's working fine:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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>
Upvotes: -2