0

Hi Guy's any help would be great.

Here's LOGCAT

 Caused by: android.view.InflateException: Binary XML file line #15 in com.example.tencil:layout/userdashboard: Binary XML file line #15 in com.example.tencil:layout/userdashboard: Error inflating class com.google.android.material.navigation.NavigationView
 Caused by: android.view.InflateException: Binary XML file line #15 in com.example.tencil:layout/userdashboard: Error inflating class com.google.android.material.navigation.NavigationView
 Caused by: java.lang.reflect.InvocationTargetException

Here's the XML:

<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:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".User.UserDashboard">


<com.google.android.material.navigation.NavigationView
    android:id="@+id/navigation_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:background="#fff"
    app:headerLayout="@layout/menu_header"
    app:menu="@menu/main_menu" />

Here's Java:

public class UserDashboard extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {

private static final String TAG = "Started User Dashboard Successfully";
//Variables
String shareBody = "This is a Great App, TENCIL APP COMING SOON";
Button btnShare;
ImageView menuIcon;
LinearLayout contentView;
static float END_SCALE = 0.7f;
RecyclerView featuredRecycler, categoriesRecycler;
RecyclerView.Adapter adapter;


//Drawer Menu
DrawerLayout drawerLayout;
NavigationView navigationView;
Context mContext;

To give some context I am basically trying to create a login system that takes the user to the User Dashboard screen

  • Have you looked on google or other Stack Overflow posts for info about java.lang.reflect.InvocationTargetException? It's pretty common; millions of people get it, so please see if some research answers your question. – Cole Henrich Jan 14 '21 at 19:09
  • Check out this link: https://stackoverflow.com/a/65604817/14921272 – Cole Henrich Jan 14 '21 at 19:11

0 Answers0