Ответ 1
Исправлено, удалив папку node_modules
и повторно запустив команду npm install
.
Я пытаюсь создать подписанный файл 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
Вот он с опцией stacktrace:
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
Я не уверен, как это исправить, так может кто-нибудь сказать мне, что происходит неправильно/как это исправить?
Дайте мне знать, если вам нужна дополнительная информация.
Исправлено, удалив папку node_modules
и повторно запустив команду npm install
.
Я тоже страдал от этой ошибки. Что я нашел, что в папке App> android есть файл, имя которого "metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock". Я удаляю этот файл и запускаю
./gradlew assembleRelease
и он работает успешно.
У меня когда-то была эта ошибка. То, что я сделал, было чистым gradle, переустановил npm и на этом все. Смотрите шаги ниже:
cd android
gradlew clean
npm install
react-native run-android
Запустите эту команду, если вы работаете в Linux.
sudo rm -R metro-symbolicate118829-8699-1t3awul.3lw9.sock
Или просто удалите все файлы, связанные с метро, некоторые файлы не могут быть удалены, поэтому вам нужно удалить его как администратор.
Если бы тот же вопрос, так что я просто почистил очищают Gradle cd android
gradlew clean
и он работал как шарм.
Не могу прокомментировать причину низкой репутации, поэтому, пожалуйста, не голосуйте против :)