maxieds / ChameleonMiniLiveDebugger

Live logger and GUI tool for the Chameleon Mini developed for Android OS in Java.
GNU General Public License v3.0
93 stars 16 forks source link

Compiling with Android Studio: CreateProcess error=2 #27

Closed doublemarkpro closed 2 years ago

doublemarkpro commented 4 years ago

I downloaded the project and load it to Android Studio. It says CreateProcess error=2 after Sync Project with Gradle Files. It hints that code:

def getShellCommandOutput(String shellCmd) {
    def cmdResult = ['bash', '-c', shellCmd].execute();
    cmdResult.waitFor();
    return cmdResult.text[0..-2];
}

has the error: CreateProcess error=2 Is there any solution for this error message?

maxieds commented 4 years ago

Ok. My advice is that whenever you update gradle, there it is typically to be expected that new errors shall arise. I am going to recommend the following course of actions. It is entirely possible that I haven't uploaded enough of the metafiles for a valid Android Studio project. In this case, please work with me to figure out a sane set of instructions to document this procedure. Thank you for supporting the roll-your-own solution of the app!

Other notes: Sometimes, running AS on Mac, it takes a little bit of time to update the app's build.gradle file when you have just recently restarted AS. I think (I will interpret what it is doing) as not fully building the project until after it checks for updates. This is definitely a bug in AS. If it persists with you, please go forth and report it upstream to developers.

1. Invalidate caches (File Menu), then restart Android Studio

Screen Shot 2020-08-17 at 11 30 20 PM

2. Clean project

Screen Shot 2020-08-17 at 11 30 29 PM

3. Make / rebuild project

Screen Shot 2020-08-17 at 11 30 36 PM

maxieds commented 4 years ago

@doublemarkpro Does that fix the issue you are having?

maxieds commented 4 years ago

@doublemarkpro After reviewing this question, it behoves me to ask whether you are running AS on Windows, or on an otherwise sane Unix environment (yes, Mac included here). If you are on windows, you are going to want to make sure there is actually a command named bash and git in the system(32?) binaries directory. GitHub had a nice installer the last time I checked to get git installed on Windows (also, a better shell replacement with auto-completion than I found elsewhere). To get bash, maybe you can try the method here?

maxieds commented 2 years ago

I am going to assume that the issue resolved itself by now.