安卓:java。朗,反思一下。InvocationTargetException有什么建议吗?
嗨,盖伊,任何帮助都很好
这是LOGCAT
Caused by: 安卓.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.安卓.material.navigation.NavigationView
Caused by: 安卓.view.InflateException: Binary XML file line #15 in com.example.tencil:layout/userdashboard: Error inflating class com.google.安卓.material.navigation.NavigationView
Caused by: java.lang.reflect.InvocationTargetException
以下是XML:
<安卓x.drawerlayout.widget.DrawerLayout xmlns:安卓="http://schemas.安卓.com/apk/res/安卓"
xmlns:app="http://schemas.安卓.com/apk/res-auto"
xmlns:tools="http://schemas.安卓.com/tools"
安卓:id="@+id/drawer_layout"
安卓:layout_width="match_parent"
安卓:layout_height="match_parent"
安卓:background="@color/colorPrimary"
安卓:gravity="center_horizontal"
安卓:orientation="vertical"
tools:context=".User.UserDashboard">
<com.google.安卓.material.navigation.NavigationView
安卓:id="@+id/navigation_view"
安卓:layout_width="match_parent"
安卓:layout_height="match_parent"
安卓:layout_gravity="start"
安卓:background="#fff"
app:headerLayout="@layout/menu_header"
app:menu="@menu/main_menu" />
以下是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;
为了提供一些上下文,我基本上是在尝试创建一个登录系统,将用户带到用户仪表板屏幕
共 (0) 个答案