Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid DrawerLayout Resource Not Found
    text
    copied!<p>I am working with an SDK minimum of API Level: 10. So, I am using the Support V4 Library to create a DrawerLayout, This is what I am doing:</p> <pre><code>manager = MainScreenActivity.getDeviceManager(); String[] drawerInfo = manager.getDrawerInfo(); DrawerLayout mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); ListView mDrawerList = (ListView) findViewById(R.id.devices_left_drawer); // Set the adapter for the list view mDrawerList.setAdapter(new ArrayAdapter&lt;String&gt;(this, R.id.devices_left_drawer, drawerInfo)); // Set the list's click listener mDrawerList.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { } }); </code></pre> <p>XML: </p> <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;FrameLayout android:id="@+id/devices_content_frame" android:layout_width="match_parent" android:layout_height="match_parent"/&gt; &lt;ListView android:id="@+id/devices_left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="left" android:choiceMode="singleChoice" android:divider="@android:color/transparent" android:dividerHeight="0dp" android:background="#111"/&gt; &lt;/android.support.v4.widget.DrawerLayout&gt; </code></pre> <p>I am getting the exception "Resource$NotFoundException" when this is opened. The strange thing is, let's say DeviceManager (My own Custom class) has no devices. The Drawer works fine, it extends and closes 100%. But, however, once my deviceManager Finds a device and adds it's name (String) to the list and then I try to add it to the DrawerLayout it crashes as soon as I open the DrawerLayout Activity. (It even crashes with hardcoding strings into it) What's wrong here?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload