关于安卓app开发androidmanifest.xml实例如何配置问题

要执行一个linux命令,比如在创建个test 文件夹,命令 mkdir /root/test。下面是我的 MainActivity.java 代码,求
androidmanifest.xml 如何配置申明,希望给个完整代码,谢谢
public void execCommand(String command) throws IOException {
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec( mkdir /root/test);
try {
if (proc.waitFor() != 0) {
System.err.println("exit value = " + proc.exitValue());
}
BufferedReader in = new BufferedReader(new InputStreamReader(
proc.getInputStream()));
StringBuffer stringBuffer = new StringBuffer();
String line = null;
while ((line = in.readLine()) != null) {
stringBuffer.append(line+" ");
}
System.out.println(stringBuffer.toString());

} catch (InterruptedException e) {
System.err.println(e);
}finally{
try {
proc.destroy();
} catch (Exception e2) {
}
}
}
其实我贴的代码就是执行linux命令的,现在要把这个代码里面的用的包如何在
androidmanifest.xml注册或者说是声明

你是要在manifest.xml里面配置执行Linux命令? manifest.xml里好像没有这个功能追问

不是在manifest.xml执行liunx命令,是配置申明

追答

代码里执行Linux命令不需要在manifest里面声明。不太明白你的意思。

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答