> cordova requirements android
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-28,android-27
Gradle: installed /usr/local/Cellar/gradle/5.4.1/bin/gradle
> cordova build android
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/juliano/Library/Android/sdk (DEPRECATED)
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 2s
/usr/local/Cellar/gradle/5.4.1/bin/gradle: Command failed with exit code 1
[ERROR] An error occurred while running subprocess cordova.
cordova build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
看来 Windows 对受控文件夹访问的防御是导致问题的原因。一旦我关闭它,我就可以像往常一样为 Android 构建。
我是一名优秀的程序员,十分优秀!