0
我想使用Java运行时运行aapt。我的代码如下:aapt使用Runtime.exec()
String srcFile = "/home/jay/testing_FILES.apk";
String dsFile = "/home/jay/testing_FILES";
String firstCommand = ("/home/jay/android-sdk-linux/platform-tools/aapt " +
"package -u -f -F" + srcFile + dsFile);
try {
Runtime rt = Runtime.getRuntime();
Runtime.getRuntime().exec(firstCommand);
} catch (IOException e1) {
e1.printStackTrace();
}
此代码不会给我一个错误,但它也不给我任何结果。有关如何解决这个问题的任何想法?此外,这意味着可移植的代码,所以如果有一种方法可以在没有脚本的情况下执行,那将是首选。