title: Android studio unable to locate project library
body: <p>I'm using Android Studio 0.8.9</p>
  
  <p>Recently, I in the process of migrating Eclipse project into Android studio project. I begun with <code>File -&gt; Import Project...</code></p>
  
  <p>I encounter a very strange problem, where Android studio unable to compile my main project, due to <strong>cannot find symbol</strong>. Those symbols suppose to found in one of my library projects : <a href="https://code.google.com/p/android-lockpattern/" rel="nofollow noreferrer">https://code.google.com/p/android-lockpattern/</a> (version 3.0.1)</p>
  
  <p>These is one of the error messages</p>
  
  <pre><code>C:\projects\xxx.java:4: error: cannot find symbol 
  import group.pals.android.lib.ui.lockpattern.prefs.DisplayPrefs;
  </code></pre>
  
  <p>These are my strange observation</p>
  
  <h2>I can confirm no error while building androidlockpattern</h2>
  
  <pre><code>:androidlockpattern:compileLint
  :androidlockpattern:copyReleaseLint UP-TO-DATE
  :androidlockpattern:preBuild
  :androidlockpattern:preReleaseBuild
  :androidlockpattern:checkReleaseManifest
  :androidlockpattern:preDebugBuild
  :androidlockpattern:preDebugTestBuild
  :androidlockpattern:prepareComActionbarsherlockActionbarsherlock440Library UP-TO-DATE
  :androidlockpattern:prepareReleaseDependencies
  :androidlockpattern:compileReleaseAidl UP-TO-DATE
  :androidlockpattern:compileReleaseRenderscript UP-TO-DATE
  :androidlockpattern:generateReleaseBuildConfig UP-TO-DATE
  :androidlockpattern:generateReleaseAssets UP-TO-DATE
  :androidlockpattern:mergeReleaseAssets UP-TO-DATE
  :androidlockpattern:generateReleaseResValues UP-TO-DATE
  :androidlockpattern:generateReleaseResources UP-TO-DATE
  :androidlockpattern:mergeReleaseResources UP-TO-DATE
  :androidlockpattern:processReleaseManifest UP-TO-DATE
  :androidlockpattern:processReleaseResources UP-TO-DATE
  :androidlockpattern:generateReleaseSources UP-TO-DATE
  :androidlockpattern:compileReleaseJava UP-TO-DATE
  :androidlockpattern:proguardRelease UP-TO-DATE
  :androidlockpattern:mergeReleaseProguardFiles UP-TO-DATE
  :androidlockpattern:compileReleaseNdk UP-TO-DATE
  :androidlockpattern:packageReleaseJniLibs UP-TO-DATE
  :androidlockpattern:packageReleaseRenderscript UP-TO-DATE
  :androidlockpattern:packageReleaseResources UP-TO-DATE
  :androidlockpattern:bundleRelease
  </code></pre>
  
  <h2>My main project does include androidlockpattern as module</h2>
  
  <pre><code>dependencies {
      compile project(':androidlockpattern')
      ...
  </code></pre>
  
  <h2>Android studio editor can recognize androidlockpattern. No red line highlighted</h2>
  
  <p><img src="https://i.stack.imgur.com/oS8Iv.png" alt="enter image description here"></p>
  
  <h2>I have other library projects. They all compiled together well with my main project. The only error so far is androidlockpattern.</h2>
  
  <p>Here's are the detailed error message</p>
  
  <pre><code>C:\projects\xxx.java:4: error: cannot find symbol
  import group.pals.android.lib.ui.lockpattern.prefs.DisplayPrefs;
                                                    ^
    symbol:   class DisplayPrefs
    location: package group.pals.android.lib.ui.lockpattern.prefs
  C:\projects\xxx.java:195: error: cannot find symbol
              Intent intent = new Intent(LockPatternActivity.ACTION_COMPARE_PATTERN, null,
                                                            ^
    symbol:   variable ACTION_COMPARE_PATTERN
    location: class LockPatternActivity
  C:\projects\xxx.java:198: error: cannot find symbol
              DisplayPrefs.setMaxRetry(this, Integer.MAX_VALUE);
              ^
    symbol:   variable DisplayPrefs
    location: class JStockFragmentActivity
  C:\projects\xxx.java:199: error: cannot find symbol
              intent.putExtra(LockPatternActivity.EXTRA_PATTERN, startupLockPattern);
                                                 ^
    symbol:   variable EXTRA_PATTERN
    location: class LockPatternActivity
  C:\projects\xxx.java:1239: error: cannot find symbol
              case LockPatternActivity.RESULT_FAILED:
  </code></pre>
  
  <p>For <code>build.gradle</code> of <code>androidlockpattern</code>, it looks like the following</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 19
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          applicationId "group.pals.android.lib.ui.lockpattern"
          minSdkVersion 10
          targetSdkVersion 10
      }
  
      buildTypes {
          release {
              runProguard true
              proguardFiles 'proguard.cfg'
          }
      }
  }
  
  dependencies {
      compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
      compile 'com.android.support:support-v4:19.1.0'
  }
  </code></pre>
  
  <p>Here's my project settings. Seems fine to me.</p>
  
  <p><img src="https://i.stack.imgur.com/5yLzj.png" alt="enter image description here"></p>
  
  <p>Any idea what other steps I can take, to diagnostic the root cause?</p>