How to write a request to get a list of friends by ID. Did this:

listView = (ListView) findViewById(R.id.ListView); String userID = "000000000"; VKRequest request = VKApi.friends().get(VKParameters.from(VKApiConst.USER_IDS, userID)); request.executeWithListener(new VKRequest.VKRequestListener() { @Override public void onComplete(VKResponse response) { super.onComplete(response); VKList list = (VKList) response.parsedModel; ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1, list); arrayAdapter.notifyDataSetChanged(); listView.setAdapter(arrayAdapter); } }); 

As a result, nothing, or the application is closed.

  • Without an error message, its type and the specific line of its occurrence you can’t help. And it is necessary to notify the adapter about changes after installing it in the ListView - YuriySPb

0