我在更新ReactNative from 0.66.5 to 0.71.0时遇到了一些问题。您需要解决一些问题,这些问题是我一点一点解决的,但现在我遇到了一个与此Gradle任务相关的问题,我无法解决。> Task :app:createBundleReleaseJsAndAssets FAILED
Execution optimizations have been disabled for task ':app:createBundleReleaseJsAndAssets' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '<whatever>/app/build/generated/res/react/release'. Reason: Task ':app:lintVitalAnalyzeRelease' uses this output of task ':app:createBundleReleaseJsAndAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
我认为关键在于Reason: Task ':app:lintVitalAnalyzeRelease' uses this output of task ':app:createBundleReleaseJsAndAssets' without declaring an explicit or implicit dependency
,但我无法找到它的解决方案。
失败总结:
* What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1
我认为这与爱马仕有关,看到痕迹:
at com.facebook.react.tasks.BundleHermesCTask.runCommand(BundleHermesCTask.kt:129)
at com.facebook.react.tasks.BundleHermesCTask.run(BundleHermesCTask.kt:89)
1条答案
按热度按时间yquaqz181#
出于某种原因,在我们的子项目结构中,我们需要将
react-native
和react
作为依赖项安装在根文件夹中,以便能够正确运行构建的所有阶段。