0

I am developing for Android with IntelliJ, using Java version 1.7. I haven't been having any problems of this nature until I do this:

    ProcessBuilder p = new ProcessBuilder("echo", "hello world")
            .redirectErrorStream(true)
            .directory(dirFile)
            .redirectOutput(new File(""));

IntelliJ highlights "redirectOutput" in red and when I mouse over it, it says:

Cannot resolve method 'redirectOutput(java.io.File)'

I have tried rebuilding, invalidating cache and restarting, etc.

Infamous911
  • 1,441
  • 2
  • 26
  • 41

1 Answers1

2

ProcessBuilder doesn´t support .redirectOutput. Read more about it here.

Try to use something like this.

Community
  • 1
  • 1
BohdanZ
  • 243
  • 2
  • 12