I am trying to use a textview to display the latest data from the database

textresult.java

package com.example.profile;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;

public class textresult extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        FirebaseDatabase database = FirebaseDatabase.getInstance();
        DatabaseReference myRef = database.getReference("predict");
        Query query = myRef.orderByChild("timestamp").limitToLast(1);
        query.addValueEventListener(new ValueEventListener() {
            @Override
            public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                Log.d("FirebaseDebug", "onDataChange: Data received"); // Add this line

                for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
                    // Get the "soreness_label", "gsr_data" and "emg_data" from the latest entry
                    String latestSorenessLabel = snapshot.child("soreness_label").getValue(String.class);


                    // Combine values to be displayed
                    String combinedValues = "Soreness Label: " + latestSorenessLabel ;


                    // Display combined values in the TextView
                    TextView textViewData = findViewById(R.id.textViewData);
                    textViewData.setText(combinedValues);
                }
            }

            @Override
            public void onCancelled(@NonNull DatabaseError databaseError) {
                Log.d("FirebaseDebug", "onCancelled: Error encountered"); // Add this line
                Log.w("Error", "Failed to read value.", databaseError.toException());
            }
        });
    }
}

activity_main.java

<?xml version='1.0' encoding='utf-8'?>
<androidx.drawerlayout.widget.DrawerLayout 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'
    android:id='@+id/drawer'
    tools:context='.MainActivity'>

    <LinearLayout
        android:layout_width='match_parent'
        android:layout_height='match_parent'
        android:background='@drawable/bg'
        android:orientation='vertical'>

        <include
            layout='@layout/main_toolbar'
            />

        <TextView
            android:layout_width='match_parent'
            android:layout_height='match_parent'
            android:text=''
            android:textSize='52sp'
            android:textStyle='bold'
            android:textColor='@color/black'
            android:gravity='center'
            android:id='@+id/textViewData'
            />

    </LinearLayout>

    <RelativeLayout
        android:layout_width="300dp"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:layout_gravity="start">

        <include
            layout = "@layout/main_navigation_drawer"
            />

    </RelativeLayout>

</androidx.drawerlayout.widget.DrawerLayout>