我刚刚开始颤抖...我正在使用VS Code Editor
。我找到了SDK
,当我运行main.dart
文件时,抛出了这个错误
Launching lib\main.dart on HUAWEI Y560 U02 in debug mode...
Please review your Gradle project setup in the android/ folder.
* Error running Gradle:
ProcessException: Process "C:\...\flutter\flutter_first\android\gradlew.bat" exited abnormally:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Configure project :app
Checking the license for package Android SDK Build-Tools 28.0.3 in C:\...\Android\sdk\licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 27 in C:\...\Android\sdk\licenses
Warning: License for package Android SDK Platform 27 not accepted.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\...\flutter\flutter_first\android\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-27 Android SDK Platform 27
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\...\Android\sdk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6m 14s
Command: C:\...\flutter_first\android\gradlew.bat app:properties
Exited (sigterm)
我现在该怎么办?任何帮助,请!非常感谢你!
答案 0 :(得分:0)
运行
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'Email', // change it to yours
'smtp_pass' => 'Pasword', // change it to yours
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$message = "
<html>
<head>
<title>Verification Code</title>
</head>
<body>
<h2>Thank you for Registering.</h2>
<p>Dear:".$this->input->POST('firstname')."</p>
<p>Email: ".$this->input->POST('user_email')."</p>
<p>Please click the link below to activate your account.</p>
<h4><a href='".base_url()."welcome/activate/".$email=$this->input->POST('user_email')."/'>Activate My Account</a></h4>
</body>
</html>
";
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from($config['smtp_user']);
$this->email->to($this->input->POST('user_email'));
$this->email->subject('Signup Verification Email');
$this->email->message($message);
//sending email
if($this->email->send()){
$this->session->set_flashdata('Success','Your Account Has Been Created Please Check your email and verify your account..!');
}
else{
$this->session->set_flashdata('message', $this->email->print_debugger());
}
并使用
检查flutter doctor --android-licenses
没有剩余的严重问题。