为了账号安全,请及时绑定邮箱和手机立即绑定

错误编译应用程序使用或覆盖已弃用的 API

错误编译应用程序使用或覆盖已弃用的 API

湖上湖 2023-07-19 10:40:19
当我编译应用程序时,它显示应用程序使用或覆盖已弃用的 API 的错误mEmailView =  findViewById(R.id.login_email);      mPasswordView =  findViewById(R.id.login_password);        googleButton = findViewById(R.id.google_button);        mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {            @Override            public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {                if (id == R.integer.login || id == EditorInfo.IME_NULL) {                    attemptLogin();                    return true;                }                return false;            }        });        textView3 = findViewById(R.id.textView3);        String text = "<font color=#cc0029>S</font><font color=#37BAF5>U</font><font color=#E000EE>M</font><font color=#BF0731>O</font>";        textView3.setText(Html.fromHtml(text));        textView3.setScaleX(2.5f);        // instance of FirebaseAuth    }        public void signInExistingUser(View v) {        //  Call attemptLogin() here    attemptLogin();    }    public void registerNewUser(View v) {        Intent intent = new Intent(this, com.one4all.sumotwo.RegisterActivity.class);        finish();        startActivity(intent);    }    private void attemptLogin() {        String email = mEmailView.getText().toString();        String password = mPasswordView.getText().toString();        if (email.equals("") || password.equals("")) {            return;        } else {            Toast.makeText(this, "Login progress...", Toast.LENGTH_SHORT).show();        }
查看完整描述

1 回答

?
慕娘9325324

TA贡献1783条经验 获得超4个赞

更新android studio后它就可以工作了。

查看完整回答
反对 回复 2023-07-19
  • 1 回答
  • 0 关注
  • 70 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信