cannot resolve getAssets() method
<p>hi i have been having trouble with the getAsset() method. i trying to get a xml file from the assets folder with the getAsset() to be put into a inputStream.</p>

<p>CODE:</p>

<pre><code>public class MainActivity extends AppCompatActivity {
    List people;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        try {
            InputStream is =  getAssets().open("people.xml");
            people = XMLParser.readPeople(is);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
</code></pre>

<p>XML:</p>

<pre><code>&lt;people&gt;
   &lt;person&gt;
       &lt;name&gt;joe&lt;/name&gt;
       &lt;dob&gt;11/08/16&lt;/dob&gt;
       &lt;gender&gt;male&lt;/gender&gt;
   &lt;/person&gt;
&lt;/people&gt;
</code></pre>

<p>can anyone tell me what going on with the getAssets() method</p>