title: Google Play Services in an Android Studio 0.1.1 gradle project?
body: <p>The latest update to Android studio does not allow one to access the project structure GUI from a project that uses gradle. Although I have configured the gradle script to use google play services, for some reason I am still unable to use the library. Here is what I did:</p>
  
  <ol>
  <li>Created a new Android project</li>
  <li>Created a folder named "libraries" in the root directory of the
  project</li>
  <li>Copied the google-play-services folder into "libraries" and renamed
  it to "google-play-services"</li>
  <li>Created a build.gradle file in the "google-play-services" folder with the following contents:</li>
  </ol>
  
  <blockquote>
  <pre><code>apply plugin: 'android-library'
  
  buildscript {
      repositories {
          mavenCentral()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:0.4'
      }
  }
  
  dependencies {
      compile files('libs/google-play-services.jar')
  }
  
  android {
      compileSdkVersion 17
      buildToolsVersion '17.0.0'
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['src']
              aild.srcDirs = ['src']
              renderscript.srcDirs = ['src']
              res.srcDirs = ['res']
              assets.srcDirs = ['assets']
          }
      }
  }
  </code></pre>
  </blockquote>
  
  <p>5.) Edited my project's build.gradle with the following:</p>
  
  <blockquote>
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.4'
      }
  }
  apply plugin: 'android'
  
  dependencies {
      compile files('libs/android-support-v4.jar')
      compile project(':libraries:google-play-services')
  }
  
  android {
      compileSdkVersion 17
      buildToolsVersion "17.0.0"
  
      defaultConfig {
          minSdkVersion 15
          targetSdkVersion 17
      }
  }
  </code></pre>
  </blockquote>
  
  <p>6.) Changed my settings.gradle to the following</p>
  
  <pre><code>include ':Rimatyo', ':libraries:google-play-services'
  </code></pre>
  
  <p>Everything compiles fine, but I cam unable to access any Google play services class from my project. All the guides I've seen online utilize the project structure GUI, which isn't possible anymore. What am I missing?</p>
  
  <p><strong>EDIT:</strong> Was able to get around the problem by importing a google play service sample app posted by Xavier Ducrohet in the adt-dev Google group and refactoring everything to make it match my project structure. Not ideal, but everything is working.</p>