3

I'm learning how to build an app through Android Studio. According to the tutorials, I'm supposed to see "Hello World" when I select Activity main/ Design. Instead, it's blank and when I add a button doesn't show anything in the design.

enter image description here

Did I miss anything? I checked different YouTube videos and forums, I couldn't find a response. How can I fix it?

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Yakine
  • 43
  • 3

2 Answers2

1

As we both can see, in the upper right corner of your screen there is a red circle error indicator. Click on it and it will pop up a screen were the respective error is explained.

If there are any errors of syntax or stuff like that, it will provide short descriptions of where the error is located and how to solve it. If not, sometimes the program has some bugs and a "Refresh Layout" button will appear in the error log. Click on that and it might solve the problem.

You can also go in File > Sync With File System and File > Sync Project With Gradle Files

Hope this helps

M'aiq the Coder
  • 762
  • 6
  • 18
0

Go to Gradle Scripts and inside Gradle Scripts changes the dependencies for these:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

Or just change the implementations:

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

I think that it happens for the version of android.