title: "android.content.res.Resources$NotFoundException: Resource ID #0x0" Error
body: <p>I am developing a Jade Multiagent System that sends messages between devices through a jade server, everything worked fine until I needed to add some Spinners, im also getting an ArrayList object from another class through an interface. Any thoughts on what Im doing wrong? Heres some of the code: </p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.ventana_enviar_mensaje);
  
      Intent intent = getIntent();
      usuario = intent.getStringExtra("usuario");
  
      Button bt = (Button) findViewById(R.id.bt_enviar);
      bt.setOnClickListener(bt_enviar_pregunta_OnClick);
  
      bt = (Button) findViewById(R.id.bt_agregar);
      bt.setOnClickListener(bt_agregar_OnClick);
  
      //Register to interface class
      try{
          interfaz = MicroRuntime.getAgent(usuario).getO2AInterface(Interfaz.class);}
      catch (StaleProxyException e) {
          e.printStackTrace();
      } catch (ControllerException e) {
          e.printStackTrace();
      }
  
              //Put some values into spinners
      Spinner sp = (Spinner) findViewById(R.id.sp_categoria);
  
      adaptador = new ArrayAdapter&lt;String&gt;(this,0);
      adaptador.add("Cat1");
      adaptador.add("Cat2");
      adaptador.add("Cat3");
      adaptador.add("Cat4");
      sp.setAdapter(adaptador);
      adaptador.clear();
  
      sp = (Spinner) findViewById(R.id.sp_tipo);
      adaptador.add("Tipo1");
      adaptador.add("Tipo2");
      adaptador.add("Tipo3");
      adaptador.add("Tipo4");
      sp.setAdapter(adaptador);
      adaptador.clear();
      //Retrieve the list from another class
      ArrayList activos = new ArrayList();
      try {
          activos = interfaz.ObtenerActivos();
          sp = (Spinner) findViewById(R.id.sp_destinatarios);
          Iterator it = activos.iterator();
          while(it.hasNext())
          {
              adaptador.add(it.next().toString());
          }           
          sp.setAdapter(adaptador);
      } catch (FIPAException e) {
          e.printStackTrace();
      }
  }
  </code></pre>