title: Unable to start activity ComponentInfo android.content.res.Resources$NotFoundException: Resource ID
body: <p>I don't know what error is this. It was working fine before, but it suddenly broke; I don't know why. Before I just change my icon and I already changed it back but it still error. Please help. if it's about the image I think not, because I use the image in login activity but it was fine</p>
  
  <p>this is my java </p>
  
  <pre><code>     @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.content_main);
              pinjamKelas();
  
              new daftarMahasiswa().execute();
          }
   public void pinjamKelas(){
          LinearLayout pinjamkelas = (LinearLayout) findViewById(R.id.pinjam_kelas);
          pinjamkelas.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent intent = new Intent(MainActivity.this, KelasActivity.class);
                  startActivity(intent);
              }
          });
      }
  class daftarMahasiswa extends AsyncTask&lt;String, String, String&gt; {
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              pDialog = new ProgressDialog(MainActivity.this);
              pDialog.setMessage("Sedang menampilkan...");
              pDialog.setIndeterminate(false);
              pDialog.setCancelable(true);
              pDialog.show();
          }
  
          @Override
          protected String doInBackground(String... params) {
              String link_url = "http://192.168.43.54/datapeminjamankelas/read_mahasiswa.php";
              JSONParser jParser = new JSONParser();
              JSONObject json = null;
              try {
                  json = jParser.AmbilJson(link_url);
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              try {
                  str_json = json.getJSONArray("data");
                  for (int i = 0; i &lt; str_json.length(); i++) {
                      JSONObject ar = str_json.getJSONObject(i);
                      String nim = ar.getString("nim").trim();
                      String nama = ar.getString("nama").trim();
                      String ruang = ar.getString("ruang").trim();
                      HashMap map = new HashMap();
                      map.put(in_nim, nim);
                      map.put(in_nama, nama);
                      map.put(in_ruang, ruang);
                      data_map.add(map);
                  }
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              MainActivity.this.runOnUiThread(new Runnable() {
                  @Override
                  public void run() {
                      list = (ListView) findViewById(R.id.list);
                      adapter = new RuangAdapter(MainActivity.this, data_map);
                      list.setAdapter(adapter);
                      setListViewHeightBasedOnChildren(list);
  
                      list.setOnItemClickListener(new AdapterView.OnItemClickListener()
  
                      {
                          @Override public void onItemClick (AdapterView &lt; ? &gt; parent, View view,
                                                             int position, long id){
                              String nim = ((TextView) view.findViewById(R.id.txtNim)).getText().toString();
                              Intent i = new Intent(MainActivity.this, DetailPinjamActivity.class);
                              i.putExtra("lemparNIM", nim);
                              startActivity(i);
                          }
                      });
                  }
              });
              return null;
          }
  
          @Override
          protected void onPostExecute(String s) {
              pDialog.dismiss();
          }
  
      }
  
      public static void setListViewHeightBasedOnChildren(ListView listView) {
          ListAdapter listAdapter = listView.getAdapter();
          if (listAdapter == null) return;
          int desiredWidth = View.MeasureSpec.makeMeasureSpec(listView.getWidth(), View.MeasureSpec.UNSPECIFIED);
          int totalHeight = 0;
          View view = null;
          for (int i = 0; i &lt; listAdapter.getCount(); i++) {
              view = listAdapter.getView(i, view, listView);
              if (i == 0)
                  view.setLayoutParams(new ViewGroup.LayoutParams(desiredWidth, ViewGroup.LayoutParams.WRAP_CONTENT));
              view.measure(desiredWidth, View.MeasureSpec.UNSPECIFIED);
              totalHeight += view.getMeasuredHeight();
          }
          ViewGroup.LayoutParams params = listView.getLayoutParams();
          params.height = totalHeight + (listView.getDividerHeight() * (listAdapter.getCount() - 1));
          listView.setLayoutParams(params);
          listView.requestLayout();
      }
  </code></pre>
  
  <p>this is my xml</p>
  
  <pre><code>&lt;LinearLayout 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"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"
      tools:context=".MainActivity"
      android:orientation="vertical"
      android:background="#ecf0f1"
      tools:showIn="@layout/app_bar_main"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="160dp"
          android:orientation="horizontal"
          android:layout_gravity="center"&gt;
  
  
      &lt;LinearLayout
          android:id="@+id/pinjam_kelas"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:background="@color/colorPrimary"
          android:foreground="?attr/selectableItemBackground"
          android:orientation="vertical"
          android:layout_gravity="center"
          android:layout_margin="10dp"&gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="100dp"
              android:paddingTop="10dp"
              android:src="@drawable/room" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Pinjam Ruang kelas"
              android:textColor="@android:color/white"
              android:layout_gravity="center_horizontal"
              android:paddingBottom="10dp"/&gt;
      &lt;/LinearLayout&gt;
  
  
      &lt;/LinearLayout&gt;
  
  
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Kelas yang telah dipinjam:"
              android:textSize="20dp"
              android:textColor="@android:color/black"
              android:layout_marginLeft="10dp"/&gt;
  
  
      &lt;android.support.v7.widget.CardView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_margin="10dp"&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:layout_marginTop="10dp"&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Peminjam"
              android:textSize="18dp"
              android:layout_marginLeft="10dp"
              android:textColor="@color/colorPrimary"/&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Kelas"
              android:textSize="18dp"
              android:gravity="right"
              android:layout_marginRight="10dp"
              android:textColor="@color/colorPrimary"/&gt;
          &lt;/LinearLayout&gt;
  
          &lt;View
              android:layout_margin="5dp"
              android:layout_width="match_parent"
              android:layout_height="1dp"
              android:background="@android:color/darker_gray"/&gt;
  
      &lt;ListView
          android:id="@+id/list"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
      &lt;/ListView&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="match_parent"
              android:text="Data Kosong"
              android:textSize="20dp"
              android:layout_gravity="center"/&gt;
  
      &lt;/LinearLayout&gt;
      &lt;/android.support.v7.widget.CardView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>this is my error</p>
  
  <pre><code> E/AndroidRuntime: FATAL EXCEPTION: main
                    Process: com.mqa.android.peminjamankelas, PID: 25294
                    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mqa.android.peminjamankelas/com.mqa.android.peminjamankelas.MainActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f070059
                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2855)
                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2930)
                        at android.app.ActivityThread.-wrap11(Unknown Source:0)
                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1619)
                        at android.os.Handler.dispatchMessage(Handler.java:105)
                        at android.os.Looper.loop(Looper.java:164)
                        at android.app.ActivityThread.main(ActivityThread.java:6683)
                        at java.lang.reflect.Method.invoke(Native Method)
                        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
                     Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f070059
                        at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:209)
                        at android.content.res.MiuiResourcesImpl.getValue(MiuiResourcesImpl.java:91)
                        at android.content.res.Resources.getValue(Resources.java:1329)
                        at android.support.v7.widget.AppCompatDrawableManager.createDrawableIfNeeded(AppCompatDrawableManager.java:234)
                        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
                        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
                        at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:755)
                        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
                        at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:87)
                        at android.support.v7.app.AppCompatDelegateImplBase.&lt;init&gt;(AppCompatDelegateImplBase.java:128)
                        at android.support.v7.app.AppCompatDelegateImplV9.&lt;init&gt;(AppCompatDelegateImplV9.java:149)
                        at android.support.v7.app.AppCompatDelegateImplV11.&lt;init&gt;(AppCompatDelegateImplV11.java:29)
                        at android.support.v7.app.AppCompatDelegateImplV14.&lt;init&gt;(AppCompatDelegateImplV14.java:54)
                        at android.support.v7.app.AppCompatDelegateImplV23.&lt;init&gt;(AppCompatDelegateImplV23.java:31)
                        at android.support.v7.app.AppCompatDelegateImplN.&lt;init&gt;(AppCompatDelegateImplN.java:31)
                        at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:198)
                        at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:183)
                        at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
                        at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:70)
                        at com.mqa.android.peminjamankelas.MainActivity.onCreate(MainActivity.java:47)
                        at android.app.Activity.performCreate(Activity.java:7046)
                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2808)
                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2930) 
                        at android.app.ActivityThread.-wrap11(Unknown Source:0) 
                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1619) 
                        at android.os.Handler.dispatchMessage(Handler.java:105) 
                        at android.os.Looper.loop(Looper.java:164) 
                        at android.app.ActivityThread.main(ActivityThread.java:6683) 
                        at java.lang.reflect.Method.invoke(Native Method) 
                        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782) 
  </code></pre>