title: Maven compilation error for android Project "error: package R does not exist "
body: <p>I am trying to set up a MAVEN project with Android application.
  I have this pom file </p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.myproject&lt;/groupId&gt;
    &lt;artifactId&gt;userprofile&lt;/artifactId&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;userprofile&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.android&lt;/groupId&gt;
              &lt;artifactId&gt;android&lt;/artifactId&gt;
              &lt;version&gt;4.1.1.4&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>and during MAVEN compile I get this error (about 100 times, ie as many times as it is used in my methods)</p>
  
  <pre><code>    [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR : 
      [INFO] -------------------------------------------------------------
  src\main\java\com\myproject\userprofile\BaseActivity.java:[52,43] error: package R does not exist
      Process finished with exit code 1
  </code></pre>
  
  <p>Any idea about this error? On the web I either find unanswered questions about similar error output. I have no experience on MAVEN, so I believe I am missing something here.</p>