4

I follow this Google link to make a sharing function in my application. However, Android studio cannot resolved symbol PlusShare in the sample code.

My google play service is updated to the newest version (Rev 32).

I also have this line in my gradle:

compile 'com.google.android.gms:play-services-auth:9.4.0'

If I am missing anything in my code, please let me know.

Thank you in advance!

Luong Truong
  • 1,953
  • 2
  • 27
  • 46

4 Answers4

1

After all the answer here by the other community, I can't see the cause of that problem. So just make sure you set up the Google Play service properly in your android, especially the different Google Play services API that you need in your build.gradle

example:

  • Google+ - com.google.android.gms:play-services-plus:9.4.0
  • Google Account Login - com.google.android.gms:play-services-auth:9.4.0

And what can I give you is another sample code or tutorials on how to make sharing to Google+ from your android app.

This tutorials can explain you the steps that you need in order to integrate Google+ in your Android.

KENdi
  • 7,576
  • 2
  • 16
  • 31
0

Installed/Updated Google Play Services, and Google Repository from SDK Manager

Add dependency in build.gradle:

 compile 'com.google.android.gms:play-services:4.0.30'

Update AndroidManifest.xml with

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Shridutt Kothari
  • 7,326
  • 3
  • 41
  • 61
  • I tried it, but Android Studio still cannot resolved symbol `PlusShare`. Do you have other suggestion? Do I need to add `classpath 'com.google.gms:google-services:3.0.0'` and `apply plugin: 'com.google.gms.google-services'` – Luong Truong Aug 11 '16 at 01:36
0

Just put this in your build.gradle dependencies compile 'com.google.android.gms:play-services-plus:9.2.0' Make sure that you're using latest version of Android Studio with updated Google play services. If at all the above dependencies create another error you can use the latest one in your gradle compile 'com.google.android.gms:play-services-plus:9.2.1'

0

Add this line in your dependency

compile 'com.google.android.gms:play-services:11.8.0'
Makvin
  • 3,475
  • 27
  • 26