title: Remove Google Play Services from app in Android Studio
body: <p>I am working on an example app in Android Studio and I somehow accidentally added Google Play Services to one of my Activities. I'm not even sure how I did it, but it added several auto generated methods, variables and imports. I removed all of these and continued to work on the app. Now, a few days later, I found</p>
  
  <pre><code>compile 'com.google.android.gms:play-services-appindexing:8.1.0'
  </code></pre>
  
  <p>in my <code>app/build.gradle</code> script and an auto-generated chunk in my manifest file:</p>
  
  <pre><code>&lt;!--
       ATTENTION: This was auto-generated to add Google Play services to your project for
       App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information.
  --&gt;
  &lt;meta-data
      android:name="com.google.android.gms.version"
      android:value="@integer/google_play_services_version" /&gt;
  </code></pre>
  
  <p>under the <code>&lt;application&gt;</code> tag. When I remove them and build the project, the <code>&lt;meta-data&gt;</code> tag is regenerated in the manifest, which causes the build to fail since I removed the dependency in build.gradle.</p>
  
  <p>How do I completely remove Google Play Services from the app and build system to stop this? What have I missed?</p>