exec错误 "incompatible types found : java.lang.Process" 问题
请问以下错误码如何解决?
想用exec(cmd); 执行一条 命令行: setprop xxxx 1
Android 代码:
String cmd;
try {
Process p = Runtime.getRuntime().exec(cmd);
} catch (IOException e) {
e.printStackTrace();
}
编译错误:
incompatible types found : java.lang.Process
required: android.os.Process
Process p = Runtime.getRuntime().exec(cmd);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error