最近,使用0.68.0版本的React Native构建项目后,在运行项目的时候,突然给报了一个Cannot access 'serviceOf': it is internal in 'org.gradle.configurationcache.extensions'
的错误,报错日志如下。
e: /Users/avishay/project/node_modules/react-native/packages/react-native-gradle-plugin/build.gradle.kts:9:49: Cannot access 'serviceOf': it is internal in 'org.gradle.configurationcache.extensions'
e: /Users/avishay/project/node_modules/react-native/packages/react-native-gradle-plugin/build.gradle.kts:41:7: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
internal inline fun TaskInternal.serviceOf(): TypeVariable(T) defined in org.gradle.configurationcache.extensions
下面是使用npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 11.6
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @