gpt4 book ai didi

react-native - 创建应用程序时 react native 错误 "Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()."

转载 作者:行者123 更新时间:2023-12-04 05:24:20 27 4
gpt4 key购买 nike

我试着做

react-native run-android

但是它出现了错误
--------------
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 PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().

* 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 0s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:

https://facebook.github.io/react-native/docs/getting-started.html

Command failed: ./gradlew installDebug

Error: Command failed: ./gradlew installDebug
at checkExecSyncError (child_process.js:637:11)
at Object.execFileSync (child_process.js:655:13)
at runOnAllDevices (/Users/bobbyjulian/Desktop/ReactNative/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:299:19)
at buildAndRun (/Users/bobbyjulian/Desktop/ReactNative/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:135:12)
at isPackagerRunning.then.result (/Users/bobbyjulian/Desktop/ReactNative/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:65:12)
at processTicksAndRejections (internal/process/next_tick.js:81:5)

最佳答案

检查您使用的 Java JDK 版本。我首先尝试了 11 版,但遇到了与您相同的错误,然后我安装了 Java JDK 8 版并根据 this 正确更新了 JAVA_HOME 设置因此问题解决了。

关于react-native - 创建应用程序时 react native 错误 "Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54413443/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com