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
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
in my app/build.gradle
script and an auto-generated chunk in my manifest file:
<!--
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.
-->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
under the <application>
tag. When I remove them and build the project, the <meta-data>
tag is regenerated in the manifest, which causes the build to fail since I removed the dependency in build.gradle.
How do I completely remove Google Play Services from the app and build system to stop this? What have I missed?
Google Play Services isn't the same as the Google Play Store app, and is included with Android. Google Play Services doesn't make your battery drain faster or use too much of your mobile data plan. You can't force stop or uninstall Google Play services.
If you don't use AR apps, you can uninstall Google Play Services for AR. On your Android device, open the device settings. Under “Apps & notifications,” find Google Play Services for AR. Tap Uninstall.
Google Play Services cannot be uninstalled on regular Android phones where Play Services was preinstalled. However, you can uninstall its updates by going to “Settings → Apps → System apps → Google Play Services.” Tap on the three-dot icon and select “Uninstall updates.” Restart your phone.
As @Chinmay stated, removing all references to Google Play Service/App indexing and deleting '<-path-android-project->/app/build' solved this for me, also.
Thanks
It just suggestion not a solution as I don't know your complete scenario. Delete all dependencies and all the build folders from your application and rebuild the project.At least It will prompt you where the play services dependency is present
Hope it will work
Don't worry, it's easy. I had same problem and I resolved it, while deleting this line of source code from dependency.
I had installed latest Google Play Service in my Android Studio, but I was using the below line in dependency.
compile 'com.google.firebase:firebase-core:11.8.0'
Just remove this line if you are using it.
It's simple
That's it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With