when making a project on android studio it will automatically be created and provided with .java, .xml files and other supporting android projects. This will be compiled early by Gradle as an adjustment before being used by a programmer in editing the program. The “MainActivity.java” file will automatically generate java script in the android studio editor, and also the “acitivty_main.xml” layout file that will be automatically generated as well. on android studio version 3.2.1, “activity_main.xml” that is formed will automatically provide 1 default container layout, Relative Layout, but for android studio version 3.8.1 the main default layout given is Constraint Layout. This is a little different in giving a default layout, where constraint layout has the characteristics of components that are in it must be precise with the parent layout. otherwise it will be considered an error. in version 3.8.1, components that have been selected and dragged down on the worksheet (form layout design) will usually not appear on the worksheet or the results of the preview, but can appear when compiled and displayed on the cellphone / emulator. this is assumed to be a bug in the android studio. The solution is to edit the “styles.xml” file (which is in the values folder) and add the “Base” keyword to the syntax style, as below:
EARLY
<! – Base application theme. ->
<style name = “AppTheme” parent = “Theme.AppCompat.Light.DarkActionBar”>
NEW
<! – Base application theme. ->
<style name = “AppTheme” parent = “Base.Theme.AppCompat.Light.DarkActionBar”>
Not Preview Component