升级依赖项后收到以下错误
java.lang.NoSuchMethodError: No direct method <init>(Landroid/content/Context;Lcom/google/android/gms/common/api/Api;Lcom/google/android/gms/common/api/Api$ApiOptions;Lcom/google/android/gms/internal/zzbel;)V in class Lcom/google/android/gms/common/api/GoogleApi; or its super classes (declaration of 'com.google.android.gms.common.api.GoogleApi' appears in /data/app/com.gifme-1/split_lib_dependencies_apk.apk:classes30.dex)
at com.google.android.gms.auth.api.phone.SmsRetrieverClient.<init>(Unknown Source)
at com.google.android.gms.internal.zzash.<init>(Unknown Source)
at com.google.android.gms.auth.api.phone.SmsRetriever.getClient(Unknown Source)
at com.facebook.accountkit.internal.PhoneLoginController.createSmsToken(PhoneLoginController.java:250)
at com.facebook.accountkit.internal.PhoneLoginController.logIn(PhoneLoginController.java:188)
at com.facebook.accountkit.internal.LoginManager.logInWithPhoneNumber(LoginManager.java:372)
at com.facebook.accountkit.internal.AccountKitController.logInWithPhoneNumber(AccountKitController.java:627)
at com.facebook.accountkit.ui.PhoneLoginFlowManager.logInWithPhoneNumber(PhoneLoginFlowManager.java:57)
at com.facebook.accountkit.ui.ActivityPhoneHandler.onPhoneLoginComplete(ActivityPhoneHandler.java:189)
at com.facebook.accountkit.ui.AccountKitActivity$1.onReceive(AccountKitActivity.java:176)
at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:308)
at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:118)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7225)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
27420
我正在使用Facebook AccountKit并点击“下一步”按钮检查短信验证是否会导致应用崩溃。
此致
答案 0 :(得分:2)
添加依赖项
compile "com.google.android.gms:play-services-auth-api-phone:11.0.2"
答案 1 :(得分:0)
即使我遇到同样的问题。 Rachit Mishra的答案为我工作。添加依赖项。
compile "com.google.android.gms:play-services-auth-api-phone:11.0.2"
似乎我们必须明确提及谷歌的auth api。