Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GooglePlusSocialNetwork java.lang.NoSuchMethodError on init #53

Open
ay-git opened this issue Nov 23, 2014 · 9 comments
Open

GooglePlusSocialNetwork java.lang.NoSuchMethodError on init #53

ay-git opened this issue Nov 23, 2014 · 9 comments

Comments

@ay-git
Copy link

ay-git commented Nov 23, 2014

On add to manager GooglePlusSocialNetwork (after init) fatal exception

E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoSuchMethodError: com.google.android.gms.common.api.GoogleApiClient$Builder.addApi at com.github.gorbin.asne.googleplus.GooglePlusSocialNetwork.onCreate(GooglePlusSocialNetwork.java:546) at com.github.gorbin.asne.core.SocialNetworkManager.onCreate(SocialNetworkManager.java:56)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1763)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:913)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:548)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
at android.app.Activity.performStart(Activity.java:5143)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

@ay-git
Copy link
Author

ay-git commented Nov 23, 2014

I use com.google.android.gms:play-services:6.+
test on asne:0.3.1 and asne:0.3.3

@andriistakhov
Copy link

I have same problem in my project

@gorbin
Copy link
Owner

gorbin commented Dec 4, 2014

Thanks, will check it and fix...

@andriistakhov
Copy link

what the status of this bug?

@ruckus
Copy link

ruckus commented Dec 10, 2014

I tracked it down to this line:

https://github.com/gorbin/ASNE/blob/master/googleplus%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgithub%2Fgorbin%2Fasne%2Fgoogleplus%2FGooglePlusSocialNetwork.java#L546

If that line changes to:

.addApi(Plus.API)

Removing the 2nd argument. Than it works.

@mathieudebrito
Copy link

Hi

How is this bug going on please ?
I have the same issue...

@acuevas91
Copy link

how is this bug going on? because I have the same problem yet, thanks!

@kalkub
Copy link

kalkub commented Apr 11, 2015

Please check this problem, I have asne:0.3.3 with actual google services and i have this bug. I have gradle not project.

@jahertor
Copy link

Yea, as @ruckus said, in v6.+ of gms you need to remove options (the 2nd parameter) from addApi method.

.addApi(Plus.API)

So you need to modify the modules: go to gradle of 'googleplus' module and change play-services to the same version you have in your app.

Also you need to change some things of every module in the new versions of gradle:

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 21
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants