you cannot set adapter for your list view because it is null
at the moment you are doing it. That is what the NullPointerException
in your stacktrace is about.
so here lista == null:
lista.setAdapter(adapter);
You should review why it is null at this point. Looks like the reason is here
lista = (GridView) findViewById(R.layout.lista_amigos);
you are looking up a R.layout
but what you want here is an ìd
of a view, so something like:
lista = (GridView) findViewById(R.id.lista_amigos);
or whatever the id of your view is. Keep in mind that findViewById will return null whenever it does not find the id.