我正在尝试为我的react本机app生成一个已签名的apk文件(通过运行./gradlew assembleRelease),但是我遇到了以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
> java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
这是堆栈跟踪选项:
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0484Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:bundleReleaseJsAndAssets
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
> java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.createSnapshot(AbstractFileSnapshotTaskStateChanges.java:57)
at org.gradle.api.internal.changedetection.rules.InputFilesTaskStateChanges.getCurrent(InputFilesTaskStateChanges.java:52)
at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.getChanges(AbstractFileSnapshotTaskStateChanges.java:42)
at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges$1.<init>(AbstractFileSnapshotTaskStateChanges.java:71)
at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.iterator(AbstractFileSnapshotTaskStateChanges.java:70)
at org.gradle.api.internal.changedetection.rules.InputFilesTaskStateChanges.iterator(InputFilesTaskStateChanges.java:68)
at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.reset(CachingTaskStateChanges.java:79)
at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.iterator(CachingTaskStateChanges.java:44)
at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.firstDirtyIterator(SummaryTaskStateChanges.java:63)
at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.access$000(SummaryTaskStateChanges.java:25)
at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges$1.computeNext(SummaryTaskStateChanges.java:49)
at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges$1.computeNext(SummaryTaskStateChanges.java:42)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.collectChangedMessages(DefaultTaskArtifactStateRepository.java:83)
at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:74)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)
at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:39)
at org.gradle.api.internal.hash.DefaultHasher.hash(DefaultHasher.java:25)
at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:82)
at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:71)
at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:34)
at org.gradle.api.internal.changedetection.state.DefaultVisitedTree$1.transform(DefaultVisitedTree.java:112)
at org.gradle.api.internal.changedetection.state.DefaultVisitedTree$1.transform(DefaultVisitedTree.java:104)
at org.gradle.util.CollectionUtils.collect(CollectionUtils.java:188)
at org.gradle.util.CollectionUtils.collect(CollectionUtils.java:183)
at org.gradle.api.internal.changedetection.state.DefaultVisitedTree.createTreeSnapshot(DefaultVisitedTree.java:104)
at org.gradle.api.internal.changedetection.state.DefaultVisitedTree.maybeCreateSnapshot(DefaultVisitedTree.java:97)
at org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter$1.run(AbstractFileCollectionSnapshotter.java:71)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:60)
at org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter.snapshot(AbstractFileCollectionSnapshotter.java:59)
at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:30)
at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.createSnapshot(AbstractFileSnapshotTaskStateChanges.java:55)
... 73 more
Caused by: java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)
at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:34)
... 93 more
BUILD FAILED
Total time: 8.509 secs
我不确定如何解决此问题,所以有人能告诉我出了什么问题/如何解决这个问题?
如果您还需要更多信息,请告诉我
答案 0 :(得分:29)
通过删除node_modules
文件夹并重新运行npm install
命令来修复它。
答案 1 :(得分:7)
我也遇到了这个错误。我在App&gt;中发现了什么安卓 文件夹中有一个名为“metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock”的文件。 我删除了这个文件并运行
./gradlew assembleRelease
并且运行成功。
答案 2 :(得分:5)
我曾经遇到这个错误。 我所做的只是干净的gradle,重新安装npm,仅此而已。 请参阅以下步骤:
{% for file in site.static_files %}
{% if file.path contains include.folder %}
{% include {{ file.path }} %}
{% endif %}
{% endif %}
答案 3 :(得分:1)
如果您使用的是Linux,请运行此命令。
sudo rm -R metro-symbolicate118829-8699-1t3awul.3lw9.sock
或者仅删除所有与Metro相关的文件,某些文件无法删除,因此您需要以管理员身份将其删除。
答案 4 :(得分:0)
遇到了同样的问题,所以我刚刚清理了gra子
cd android
gradlew clean
而且它就像一种魅力。
无法评论信誉低下的原因,因此请不要投反对票:)