我使用aws移动中心为用户使用Facebook和谷歌编写了一个Android应用程序,但收到错误

时间:2017-12-09 10:31:35

标签: amazon-web-services amazon-cognito aws-mobilehub amazon-mobile-hub

我正在使用Aws Mobile Hub构建一个提供facebook和Googlelogin按钮的Android应用程序。我使用Aws移动集线器添加了这些功能并下载了一个示例应用程序。当我运行应用程序时,我收到了下面提到的错误。

com.android.dialer/com.android.incallui.InCallActivity

我完全添加了所有依赖项。下面是build.gradle文件

E/SignInView: Couldn't construct the object. Class com.amazonaws.mobile.auth.facebook.FacebookButton is not found. Please import the appropriate dependencies: com.amazonaws.mobile.auth.facebook.FacebookButton
                                                             java.lang.NoSuchMethodException: <init> [class android.content.Context]
                                                                 at java.lang.Class.getConstructor0(Class.java:2204)
                                                                 at java.lang.Class.getConstructor(Class.java:1683)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.createDependencyObject(SignInView.java:420)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.addSignInButtonsToView(SignInView.java:502)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.setUpSignInButtons(SignInView.java:282)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.<init>(SignInView.java:317)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.<init>(SignInView.java:159)
                                                                 at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                 at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
                                                                 at android.view.LayoutInflater.createView(LayoutInflater.java:652)
                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:794)
                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734)
                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:496)
                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:378)
                                                                 at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
                                                                 at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                                                                 at com.amazonaws.mobile.auth.ui.SignInActivity.onCreate(SignInActivity.java:113)
                                                                 at android.app.Activity.performCreate(Activity.java:6955)
                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
                                                                 at android.app.ActivityThread.-wrap14(ActivityThread.java)
                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
                                                                 at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                 at android.os.Looper.loop(Looper.java:154)
                                                                 at android.app.ActivityThread.main(ActivityThread.java:6776)
                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
E/SignInView: Cannot construct an object of SignInButton com.amazonaws.mobile.auth.facebook.FacebookButton


E/SignInView: Couldn't construct the object. Class com.amazonaws.mobile.auth.google.GoogleButton is not found. Please import the appropriate dependencies: com.amazonaws.mobile.auth.google.GoogleButton
                                                             java.lang.NoSuchMethodException: <init> [class android.content.Context]
                                                                 at java.lang.Class.getConstructor0(Class.java:2204)
                                                                 at java.lang.Class.getConstructor(Class.java:1683)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.createDependencyObject(SignInView.java:420)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.addSignInButtonsToView(SignInView.java:502)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.setUpSignInButtons(SignInView.java:282)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.<init>(SignInView.java:317)
                                                                 at com.amazonaws.mobile.auth.ui.SignInView.<init>(SignInView.java:159)
                                                                 at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                 at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
                                                                 at android.view.LayoutInflater.createView(LayoutInflater.java:652)
                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:794)
                                                                 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734)
                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:496)
                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
                                                                 at android.view.LayoutInflater.inflate(LayoutInflater.java:378)
                                                                 at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
                                                                 at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                                                                 at com.amazonaws.mobile.auth.ui.SignInActivity.onCreate(SignInActivity.java:113)
                                                                 at android.app.Activity.performCreate(Activity.java:6955)
                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
                                                                 at android.app.ActivityThread.-wrap14(ActivityThread.java)
                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
                                                                 at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                 at android.os.Looper.loop(Looper.java:154)
                                                                 at android.app.ActivityThread.main(ActivityThread.java:6776)
                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
E/SignInView: Cannot construct an object of SignInButton com.amazonaws.mobile.auth.google.GoogleButton

我甚至检查了AWS的github存储库的问题部分,但找不到任何内容。我也搜索了这个问题,但没有运气。你能帮我解决这个问题。

0 个答案:

没有答案