Error inflating class com.facebook.widget.LoginButton

前端 未结 14 2646
星月不相逢
星月不相逢 2020-12-15 06:54

I have built a Facebook integration using the steps from the 3.0 documentation. It works fine in when I deploy the app to my phone using Eclispe; however, when I export the

14条回答
  •  再見小時候
    2020-12-15 07:37

    I tried Programatically creating instance of LoginButton programatically like

    LoginButton loginButton = new LoginButton(this);
    

    and added this to a LinearLayout

        fbLoginButton = (LinearLayout) findViewById(R.id.fb_login_view);
        fbLoginButton.addView(loginButton);
    

    And here is the glimpse of my layout xml

    
    

    This is ofcourse following the edit suggested by @Lalit Kumar's answer Let me know if I am missing anything.

提交回复
热议问题