gpt4 book ai didi

java - 尝试发送电子邮件时出现错误

转载 作者:行者123 更新时间:2023-12-02 08:08:25 24 4
gpt4 key购买 nike

我的代码是...

public class AndroidEmailActivity extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final EditText edittextEmailAddress = (EditText) findViewById(R.id.email_address);
final EditText edittextEmailSubject = (EditText) findViewById(R.id.email_subject);
final EditText edittextEmailText = (EditText) findViewById(R.id.email_text);
Button buttonSendEmail_intent = (Button) findViewById(R.id.sendemail_intent);

buttonSendEmail_intent.setOnClickListener(new Button.OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub

String emailAddress = edittextEmailAddress.getText().toString();
String emailSubject = edittextEmailSubject.getText().toString();
String emailText = edittextEmailText.getText().toString();

String emailAddressList[] = { emailAddress };

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, emailAddressList);
intent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
intent.putExtra(Intent.EXTRA_TEXT, emailText);
startActivity(Intent.createChooser(intent,
"Choice App t send email:"));

}
});
}
}

我在控制台窗口中收到错误

[2011-10-18 12:43:54 - AndroidEmail] Re-installation failed due to different application signatures.
[2011-10-18 12:43:54 - AndroidEmail] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-10-18 12:43:54 - AndroidEmail] Please execute 'adb uninstall com.android.email' in a shell.
[2011-10-18 12:43:54 - AndroidEmail] Launch canceled!

最佳答案

我认为发生此错误的原因是,应用程序已从另一台计算机安装在设备中。要解决此问题,您首先需要卸载该应用程序,然后尝试安装新的应用程序。

关于java - 尝试发送电子邮件时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7803643/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com