title: Android Accessing hidden field Landroid/widget/AbsListView;->mIsChildViewEnabled:Z (greylist, reflection, allowed)
body: <p>I am trying to populate a spinner with data from an API. However, when I try to open the spinner it is giving met the following error: <code>Android Accessing hidden field Landroid/widget/AbsListView;-&gt;mIsChildViewEnabled:Z (greylist, reflection, allowed)</code></p>
  <p>I put the spinner inside a fragment and I use this fragment inside my main_activity:</p>
  <pre><code>import android.os.Bundle;
  import androidx.fragment.app.Fragment;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.ProgressBar;
  import android.widget.Spinner;
  import android.widget.TextView;
  import com.android.volley.Request;
  import com.android.volley.RequestQueue;
  import com.android.volley.Response;
  import com.android.volley.VolleyError;
  import com.android.volley.toolbox.JsonObjectRequest;
  import com.android.volley.toolbox.Volley;
  import com.booij.mydogapplication.R;
  import org.json.JSONException;
  import org.json.JSONObject;
  import java.io.IOException;
  import java.io.InputStream;
  import java.lang.reflect.Array;
  import java.net.HttpURLConnection;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.Iterator;
  
  public class SearchbarFragment extends Fragment
  {
      private URL _url;
      private Spinner _spinner;
      private ArrayList&lt;String&gt; _breedList;
  
      public SearchbarFragment()
      {
          // Required empty public constructor
          try
          {
              _url = new URL(&quot;https://dog.ceo/api/breeds/list/all&quot;);
              _breedList = new ArrayList&lt;&gt;();
          } catch (MalformedURLException e)
          {
              e.printStackTrace();
          }
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
      {
          View view =  inflater.inflate(R.layout.fragment_searchbar, container, false);
  
          _spinner = view.findViewById(R.id.breedDropdown);
          setSpinnerList();
  
          _spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
          {
  
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id)
              {
                  Log.e(&quot;myInfo&quot;, String.valueOf(position));
                  Log.e(&quot;myInfo&quot;, _breedList.get(position));
              }
  
              @Override
              public void onNothingSelected(AdapterView&lt;?&gt; parent)
              {
  
              }
          });
  
          // Inflate the layout for this fragment
          return inflater.inflate(R.layout.fragment_searchbar, container, false);
      }
  
  
      private void setSpinnerList()
      {
          JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, _url.toString(), null,
              new Response.Listener&lt;JSONObject&gt;()
              {
                  @Override
                  public void onResponse(JSONObject response)
                  {
                      try
                      {
                          JSONObject breeds = new JSONObject(response.getString(&quot;message&quot;));
  
                          _breedList.add(&quot;&quot;);
                          Iterator&lt;String&gt; iterator = breeds.keys();
                          while (iterator.hasNext())
                          {
                              String key = iterator.next();
                              _breedList.add(key);
                          }
                          ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter(getActivity(), android.R.layout.simple_list_item_1, _breedList.toArray());
                          adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view
                          _spinner.setAdapter(adapter);
                          //spinner.setSelection(0);
  
                      }
                      catch (JSONException jsonException)
                      {
                          jsonException.printStackTrace();
                      }
                  }
              },
              new Response.ErrorListener()
              {
                  @Override
                  public void onErrorResponse(VolleyError error)
                  {
                      error.printStackTrace();
                  }
              });
  
          RequestQueue queue = Volley.newRequestQueue(getActivity());
  
          queue.add(jsonObjectRequest);
      }
  
  }
  </code></pre>
  <p>What am I doing wrong? Please let me know if I need to provide extra details.Thanks in advance</p>