Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Shell无法使用拼接命令 #310

Open
nymanyim opened this issue Jan 16, 2025 · 0 comments
Open

[BUG] Shell无法使用拼接命令 #310

nymanyim opened this issue Jan 16, 2025 · 0 comments

Comments

@nymanyim
Copy link

var deviceId = "6"; // 这里假设你传入的 deviceId 是 6
var cmd = "echo " + deviceId;
shell(cmd, true);

报错:
调用方法 "shell" 失败: [ Argument cmd must be a string or JavaScript Array instead of echo 6 (JavaObject) ]
java.lang.RuntimeException: 调用方法 "shell" 失败: [ Argument cmd must be a string or JavaScript Array instead of echo 6 (JavaObject) ]....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant