I am a bit of a newbie so please bear with me. Before anyone recommends me any other post, I have already looked through all posts, which there aren't many of, of people who have had this exact issue, and none of those solutions work. Whenever I edit themes.xml in my Android Studio project to remove the title bar, which I will demonstrate below:
style name="Theme.App" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
which I change to
style name="Theme.App" parent="Theme.MaterialComponents.DayNight.NoActionBar">
this change, which should remove the title bar, causes the app to immediately crash when attempting to open no matter which android version I test it on. In attempting to troubleshoot this, I have even completely tried making a fresh project, and doing the same change, but even that app still crashes, meaning that it can't be any code that's in my app interfering and causing it to crash. Any help is greatly appreciated.
Edit: Here is my activity_main
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="?android:attr/windowBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_nav_menu" />
<fragment
android:id="@+id/nav_host_fragment_activity_main"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="411dp"
android:layout_height="678dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@id/nav_view"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
And in case anyone asks for errors, Android Studio gives zero errors when building and running the program, only when I run it on the device, It simply opens and immediately gives me the "Unfortunately, program has stopped" error.