I 'm trying to set background of my main activity in my application something like in this way:-
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.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:background="@drawable/background"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
but the code gives me error:
The following classes could not be instantiated:
- android.support.v4.widget.DrawerLayout (Open Class, Show Exception, Clear Cache)
i don't know why this happens.@drawable/background
is an image of resolution 1080x1920. I tried to give a color instead of image and it works very well then.But got errors when it comes to an image.Am i missing something?
Please help me out.