最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

android - Running cordova build manually works, but through c#'s Process doesnt - Stack Overflow

matteradmin7PV0评论

Recently I've developed an app that allows users to generate APK's through a website providing the source.

Manually, the user would've ran yarn run cordova build android and it would've created the APK normally, but my app is supposed to start a new Process and run that exact same command like this:

var process = new Process
{
    StartInfo = new ProcessStartInfo
    {
        FileName = "cmd.exe",
        Arguments = $@"/c yarn run cordova build android > log2.txt 2>&1",
        RedirectStandardOutput = false,
        UseShellExecute = true,
        CreateNoWindow = false,
        LoadUserProfile = true
    }
};

process.Start();

but the log returns this:

A problem occurred evaluating root project 'android'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.

I've tried checking and setting the Android\Sdk\tools and Android\Sdk\platform-tools on the system's PATH, but no succcess still.

Cordova version: 12.0.0 Gradle version: 8.1.1

Any ideas?

Post a comment

comment list (0)

  1. No comments so far