ASNE
ASNE copied to clipboard
GooglePlusSocialNetwork java.lang.NoSuchMethodError on init
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)
I use com.google.android.gms:play-services:6.+ test on asne:0.3.1 and asne:0.3.3
I have same problem in my project
Thanks, will check it and fix...
what the status of this bug?
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.
Hi
How is this bug going on please ? I have the same issue...
how is this bug going on? because I have the same problem yet, thanks!
Please check this problem, I have asne:0.3.3 with actual google services and i have this bug. I have gradle not project.
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'
}
}