【问题标题】:Ionic build error: Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()离子构建错误:无法使用 BuildScopeServices.createScriptPluginFactory() 创建 ScriptPluginFactory 类型的服务
【发布时间】:2019-05-17 14:32:01
【问题描述】:
> 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.

【问题讨论】:

  • 你找到解决办法了吗?
  • 有什么解决办法吗?

标签: java android cordova ionic-framework gradle


【解决方案1】:

似乎是针对受控文件夹访问的 Windows 防御导致了这些问题。一旦我把它关掉,我就可以像往常一样为 android 构建。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-23
    • 1970-01-01
    • 2020-05-12
    • 1970-01-01
    相关资源
    最近更新 更多