title: Android : Can't import ViewRoot
body: <p>I'm writing an app where I want to start with a <code>View</code> object and walk up the <code>View</code> hierarchy, using <code>getParent()</code> until I get all the way to <code>ViewRoot</code>, which I hope to detect using <code>instanceof</code>.</p>
  
  <p>Seems simple enough, but I'm in trouble already because I can't seem to import <code>ViewRoot</code>. On the line where I have:</p>
  
  <pre><code>import android.view.ViewRoot;
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>The import android.view.ViewRoot cannot be resolved</p>
  </blockquote>
  
  <p>I've written dozens of apps in this environment, importing everything under the sun but I've never had a problem like this.</p>
  
  <p>Eclipse 3.52, target is Android 2.2 and higher.</p>