Android studioのnew projectでEmpty Activityにて作成すると初めに作成されるコードです。単純にandroidの真ん中にHello World!が表示されるサンプルコードです。

サンプル

activity_main.xml

				
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />