Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I wanted to create a first page to my application in which you must log in/register successfully to facebook in order to take you to the next Intent.

(我想为我的应用程序创建一个首页,您必须在该首页中成功登录/注册到Facebook,才能带您进入下一个Intent。)

I've followed the tutorial from here: https://developers.facebook.com/docs/facebook-login/android , but i've couldn't implement what was on point 3. (if i did that, then it wouldn't show me anything, just a blank screen).

(我从这里开始遵循该教程: https : //developers.facebook.com/docs/facebook-login/android ,但是我无法实现第3点的内容。(如果我这样做了,那么它就不会什么也没给我看,只是一个空白屏幕)。)

If i run it now, it shows me the facebook button, but when I click on it and it gets me to the login page, if I want to type anyhing in the boxes I get errors like:

(如果我现在运行它,它会显示给我facebook按钮,但是当我单击它并进入登录页面时,如果我想在框中键入任何内容,则会出现类似以下错误:)

E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000bd0
E/eglCodecCommon: **** ERROR unknown type 0x73000d (glSizeof,73)
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000b44
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000bd0
E/eglCodecCommon: **** ERROR unknown type 0x73000d (glSizeof,73)
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000b44
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000bd0
E/eglCodecCommon: **** ERROR unknown type 0x73000d (glSizeof,73)
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000b44
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000bd0
E/eglCodecCommon: **** ERROR unknown type 0x73000d (glSizeof,73)
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000b44
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000bd0
E/eglCodecCommon: **** ERROR unknown type 0x73000d (glSizeof,73)
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000b44
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00000bd0
E/eglCodecCommon: **** ERROR unknown type 0x73000d (glSizeof,73)

This is my java file:

(这是我的java文件:)

public class LogIn extends AppCompatActivity {
    // @Override
    CallbackManager callbackManager;
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        FacebookSdk.sdkInitialize(getApplicationContext());

        callbackManager = CallbackManager.Factory.create();

        setContentView(R.layout.activity_log_in);

        AppEventsLogger.activateApp(this);  
    }

    public View onCreateView(
            LayoutInflater inflater,
            ViewGroup container,
            Bundle savedInstanceState) {
                    View view = inflater.inflate(R.layout.activity_log_in, container, false);
                    LoginButton loginButton = (LoginButton) view.findViewById(R.id.login_button);
                    loginButton.setReadPermissions("email");
                    loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
                        @Override
                        public void onSuccess(LoginResult loginResult) {
                            // App code
                            Toast.makeText(getApplicationContext(), "success", Toast.LENGTH_LONG).show();
                        }

                        @Override
                        public void onCancel() {
                            // App code
                            Toast.makeText(getApplicationContext(), "no success", Toast.LENGTH_LONG).show();
                        }

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

I've also added what was in that tutorial for the AndroidManifest.xml file and strings.xml

(我还为AndroidManifest.xml文件和strings.xml添加了该教程中的内容)

  ask by Andreea Mateescu translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
346 views
Welcome To Ask or Share your Answers For Others

1 Answer

This error is from the Android simulators OpenGL rendering engine and not from your code.

(此错误来自Android模拟器OpenGL渲染引擎,而不是您的代码。)

You can change the rendering settings inside simulators options under settings -> advanced.

(您可以在设置->高级下的模拟器选项内更改渲染设置。)

But from other threads people reported problems can persist, which was the case for me too.

(但是从其他线程来看,人们报告说问题仍然存在,我也是如此。)

Another very useful solution is to add a new logcat filter inside Android Studio.

(另一个非常有用的解决方案是在Android Studio中添加新的logcat过滤器。)

This way you can exclude noisy log messages and keep the log to their app only.

(这样,您可以排除嘈杂的日志消息并将日志仅保留到其应用程序中。)

新的Logcat筛选器设置

Add your exclusions to Log Tag like this: ^(?!(eglCodecCommon|tagToExclude))

(将您的排除项添加到Log Tag中,如下所示: ^(?!(eglCodecCommon | tagToExclude)))

Add your package name or prefix to Package Name : com.mycompany.

(将您的包名称或前缀添加到“ 包名称”com.mycompany。)

This way it is possible to filter for as many strings you like and keep the log to your package.

(这样就可以过滤出您喜欢的任意多个字符串并将日志保存到包中。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...