我用system("system/test"),执行一个脚本,但好像没有执行,在命令行下执行是好的,
请问为什么,android是否封装了其他的API?谢谢
请问为什么,android是否封装了其他的API?谢谢
解决方案 »
- LinearLayout中,如何让作为Lable的TextView,和EditText放在同一行?谢谢!
- SurfaceView屏幕闪烁与双缓冲
- 怎么删除table里面一条数据啊
- 如何引用一个静态数组里边的值
- NDK中使用surface问题
- Service中启动Activity失败
- android客户端连接服务器,用wifi可以访问成功,但用gprs访问的时候报错java.net.SocketException
- 【急!!!请教】android做json解析,从服务器获取资源
- Android问题求指教
- Android分享功能,腾讯微博转播的activity如何自定义布局?
- 初学android ,求一个简单的sqlite例子
- 请问android如何实现属性页对话框
Runtime runtime = Runtime.getRuntime();
Process proc = null;
try {
proc = runtime.exec(command);
} catch (IOException e1) {
e1.printStackTrace();
}
// put a BufferedReader on the ps output
InputStream inputstream = proc.getInputStream();
InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
// read the ps output and show it to screen.
...
... // judge the return value
try {
if (proc.waitFor() != 0) {
System.err.println("exit value = " + proc.exitValue());
}
}
catch (InterruptedException e) {
System.err.println(e);
}