0
public View onCreateView(
        LayoutInflater inflater,
        ViewGroup container,
        Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.splash, container, false);

    loginButton = (LoginButton) view.findViewById(R.id.login_button);
    loginButton.setReadPermissions("email");
    // Other app specific specialization

    // Callback registration
    loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
        @Override
        public void onSuccess(LoginResult loginResult) {
            // App code
        }

        @Override
        public void onCancel() {
            // App code
        }

        @Override
        public void onError(FacebookException exception) {
            // App code
        }
    });
}

Cannot display logout button after Facebook login, then I added these code from Facebook developer website source code, after that appear this "R.layout.splash" error, who can help me solve, thank you very much.

Kent Chong
  • 79
  • 6
  • Possible duplicate of ["cannot resolve symbol R" in Android Studio](http://stackoverflow.com/questions/17054000/cannot-resolve-symbol-r-in-android-studio) – Pavneet_Singh Oct 17 '16 at 09:09
  • clean the project first. Check you import. and if possible, first remove your already imported `R` and again import it – AMAN SINGH Oct 17 '16 at 09:16
  • @PavneetSingh Hi. Cannot resolve symbol R meant include "R.layout.splash" error? – Kent Chong Oct 17 '16 at 09:19
  • @AMANSINGH Hello, actually I can get Facebook login function in login activity, but no display Facebook logout button after login Facebook. And then I clean my project and rebuild again, still can't resolve it. – Kent Chong Oct 17 '16 at 09:22
  • if clean did help then it mean there is something wrong with resources like they are misplaced , missing , wrong naming convention used or it could be something wrong with fb dependency etc so have to look for every possibility – Pavneet_Singh Oct 17 '16 at 09:27

1 Answers1

1

Try to create an xml file for your missing layout resource.

aznelite89
  • 2,025
  • 4
  • 21
  • 32