title: Using Jenkins to build an android gradle project fails
body: <p>I'm trying to setup Jenkins on a computer running OSX and I'm running into a problem.</p>
  
  <p>When I'm trying to build the project with my default user account everything works fine, but as soon as im trying to build via Jenkins the build fails with the following output:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring project ':Project'.
  &gt; Failed to notify project evaluation listener.
      &gt; A problem occurred configuring project ':libraries:actionbarsherlock'.
          &gt; Failed to notify project evaluation listener.
              &gt; Could not resolve all dependencies for configuration ':libraries:actionbarsherlock:compile'.
                  &gt; Could not find com.android.support:support-v4:13.0.0.
                    Required by:
                        workspace.libraries:actionbarsherlock:unspecified
  </code></pre>
  
  <p>My build.gradle for the project 'libraries:actionbarsherlock' looks like this:</p>
  
  <pre><code>buildscript {
      repositories {
          maven { url 'http://repo1.maven.org/maven2' }
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.4.2'
      }
  }
  apply plugin: 'android-library'
  
  dependencies {
      compile 'com.android.support:support-v4:13.0.0'
  }
  
  android {
      compileSdkVersion 17
      buildToolsVersion "17.0.0"
  
      defaultConfig {
          minSdkVersion 7
          targetSdkVersion 16
      }
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['src']
              res.srcDirs = ['res']
          }
      }
  }
  </code></pre>
  
  <p>As far as I know the dependency to com.android.support:support-v4:13.0.0 should be satisfied through the local maven repository installed via the Android SDK Manager. As I said this is working when building on my user account, but it seems to fail when trying to build with Jenkins.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I was able to resolve this issue by checking the user permissions on my android-sdk folder. Problem seemed to be that while the jenkins user had read&amp;write permissions on the android sdk root folder it was lacking the permissions to access stuff installed through the android sdk manager.</p>