Возникла ошибка при создании нижнего меню навигации

error_android01.pngВсем привет, я только начинаю изучать язык программирования Java и android studio. Я хочу создать нижнюю панель навигации по информации из интернета. Но у меня все время возникает одна и таже ошибка

вот home_Activity.java

package com.example.app;

import static com.example.app.R.id.navigation_home;
import static com.example.app.R.id.navigation_menu;
import static com.example.app.R.id.navigation_package;
import static com.example.app.R.id.navigation_refund;
import static com.example.app.R.id.navigation_shipment;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import java.io.*;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.MenuItem;
import android.os.Bundle;
import com.example.app.databinding.ActivityMainBinding;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.os.Bundle;
import com.google.android.material.bottomnavigation.BottomNavigationView;

public class home_Activity extends AppCompatActivity {
    ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(R.layout.activity_home);
        replaceFragment(new order_Fragment());
        binding.bottomNavigationView.setOnItemSelectedListener(item->{
            switch (item.getItemId()){
                //bottomNavigationView
                case navigation_home:
                    replaceFragment(new order_Fragment());
                    break;
                case navigation_shipment:
                    replaceFragment(new reception_Fragment());
                    break;
                case navigation_package:
                    replaceFragment(new shipment_Activity());
                    break;
                case navigation_refund:
                    replaceFragment(new refund_Fragment());
                    break;
                case navigation_menu:
                    replaceFragment(new menu_Fragment());
                    break;

            }
            return true;
        });


        // Initialize and assign variable
    }
    private  void replaceFragment(Fragment fragment){
        FragmentManager fragmentManager =  getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.fl_content,fragment);
        fragmentTransaction.commit();
    }
}

вот activity_home.xml

<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".home_Activity">

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottomNavigationView"
        android:layout_width="match_parent"
        android:layout_height="75dp"
        android:background="#00FFFFFF"
        app:itemIconTint="@color/post_blue"
        app:itemTextColor="@color/post_blue"
        app:itemActiveIndicatorStyle="@color/post_blue"
        app:itemRippleColor="@color/post_blue50"
        app:labelVisibilityMode="labeled"
        app:layout_constraintBottom_toBottomOf="parent"
        app:menu="@menu/m_bottom_navigation_web" />

    <FrameLayout
        android:id="@+id/fl_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="65dp"
        app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
        app:layout_constraintTop_toTopOf="parent"
        tools:layout_editor_absoluteX="-8dp">

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

вот m_bottom_navigation_web.xml

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/navigation_home"
        android:icon="@drawable/ic_24_postal_box_menu"
        android:title="@string/postal_box_home_menu"/>

    <item
        android:id="@+id/navigation_shipment"
        android:icon="@drawable/ic_24_postal_shipment_menu"
        android:title="@string/postal_shimpment_reception_menu"/>

    <item
        android:id="@+id/navigation_package"
        android:icon="@drawable/ic_24_postal_package_menu"
        android:title="@string/postal_package_shipment_menu"/>

    <item
        android:id="@+id/navigation_refund"
        android:icon="@drawable/ic_24_postal_refund_back_menu"
        android:title="@string/postal_refund_menu"/>

    <item
        android:id="@+id/navigation_menu"
        android:icon="@drawable/ic_24_action_menu"
        android:title="@string/postal_Menu_menu_menu"/>

Ответы (0 шт):