我正在构建一个基于以下内容的Android应用程序: https://code.google.com/p/ics-openvpn/但是,在签名和导出后,某些原始代码不起作用:
private void startOpenVPNThreadArgs(String[] argv, Map<String, String> env) {
LinkedList<String> argvlist = new LinkedList<String>();
Collections.addAll(argvlist, argv);
ProcessBuilder pb = new ProcessBuilder(argvlist);
// Hack O rama
String lbpath = genLibraryPath(argv, pb);
pb.environment().put("LD_LIBRARY_PATH", lbpath);
// Add extra variables
for(Entry<String,String> e:env.entrySet()){
pb.environment().put(e.getKey(), e.getValue());
}
pb.redirectErrorStream(true);
try {
mProcess = pb.start();
// Close the output, since we don't need it
mProcess.getOutputStream().close();
InputStream in = mProcess.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
while(true) {
String logline = br.readLine();
if(logline==null) {
System.out.println("logline == null");
return;
}
等。
我不断得到:logline == null
,然后连接断开。无例外参数 env 是一张空地图!这都是原始代码,我真的不知道去哪里看,因为没有注释或JavaDoc。谁能帮我解决这个问题?谢谢
当我意识到它试图编写一些不存在的二进制文件时,发现了这里的问题:s