我正在尝试通过运行以下命令在 android 设备(小米 Pocophone)上运行我的 ionic 应用程序:
离子科尔多瓦运行安卓
但是,我收到以下错误消息:
BUILD SUCCESSFUL in 7s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
C:\laragon\www\ionicProject\platforms\android\app\build\outputs\apk\debug\app-debug.apk
> native-run.cmd android --app
platforms\android\app\build\outputs\apk\debug\app-debug.apk --device
[native-run] Selected hardware device 4d65535f
[native-run] Installing platforms\android\app\build\outputs\apk\debug\app-debug.apk...
[native-run] ERR_UNKNOWN: Non-zero exit code from adb: 1
[ERROR] An error occurred while running subprocess native-run.
native-run.cmd android --app
platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Run Code Online (Sandbox Code Playgroud)
我的手机通过usb type c线正确连接,开发者模式已经打开,usb调试模式打开
我尝试重新启动 PC 并关闭无关的 IDE,例如 Laragon …
我有一组数据需要进行处理才能生成报告
以下是提供的数据样本
$arrival_data = [
[
"arrival_date" => "09-Dec-2020",
"total_amount" => "10",
"total_traveller" => 6
],
[
"arrival_date" => "09-Dec-2020",
"total_amount" => "20",
"total_traveller" => 6
],
[
"arrival_date" => "10-Dec-2020",
"total_amount" => "40",
"total_traveller" => 3
]
];
Run Code Online (Sandbox Code Playgroud)
我想处理上面的数据,以便它将按“arrival_date”分组并对数据求和,以便数据显示如下
$arrival_data = [
[
"arrival_date" => "09-Dec-2020",
"total_amount" => "30", // sum of 10 + 20
"total_traveller" => 6
],
[
"arrival_date" => "10-Dec-2020",
"total_amount" => "40",
"total_traveller" => 3
]
];
Run Code Online (Sandbox Code Playgroud)
我还没有设法使用 Laravel Collection 生成预期的输出,我能得到的最接近的输出如下
{
"09-Dec-2020": 30,
"10-Dec-2020": …Run Code Online (Sandbox Code Playgroud)