我有一个本机应用程序,我可以在Linux中构建和运行,没有任何问题,当我尝试在Mac中做同样的事情时(我仍在尝试使用Android工作室在Mac中使用Android模拟)我是收到以下错误:
失败:构建因异常而失败。
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> Configuration with name 'default' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
我正在运行以下命令:
react-native run-android
我更新了gradle脚本以包含--debug和--stacktrace选项,这里是调试日志
22:19:10.625 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.005 secs
22:19:10.626 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :react-native-share - Transitioning model element 'tasks' from state Created to SelfClosed
22:19:10.626 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :react-native-share - Transitioning model element 'tasks' to state DefaultsApplied.
22:19:10.626 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :react-native-share - Transitioning model element 'tasks' to state Initialized.
22:19:10.626 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :react-native-share - Transitioning model element 'tasks' to state Mutated.
22:19:10.626 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :react-native-share - Transitioning model element 'tasks' to state Finalized.
22:19:10.626 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :react-native-share - Transitioning model element 'tasks' to state SelfClosed.
22:19:10.646 [ERROR] [org.gradle.BuildExceptionReporter]
22:19:10.648 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
22:19:10.649 [ERROR] [org.gradle.BuildExceptionReporter]
22:19:10.649 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
22:19:10.649 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring project ':app'.
22:19:10.649 [ERROR] [org.gradle.BuildExceptionReporter] > Could not resolve all dependencies for configuration ':app:_debugApk'.
22:19:10.649 [ERROR] [org.gradle.BuildExceptionReporter] > Configuration with name 'default' not found.
22:19:10.650 [ERROR] [org.gradle.BuildExceptionReporter]
22:19:10.650 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
22:19:10.651 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
22:19:10.652 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
22:19:10.652 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
22:19:10.652 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:540)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:93)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:124)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
22:19:10.653 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:121)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
22:19:10.654 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
22:19:10.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':app:_debugApk'.
22:19:10.656 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationResolver.java:70)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver.java:45)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:372)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:347)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:340)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.DependencyManager.collectArtifacts(DependencyManager.java:497)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.DependencyManager.gatherDependencies(DependencyManager.java:375)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.DependencyManager.resolveDependencyForConfig(DependencyManager.java:278)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.DependencyManager.resolveDependencies(DependencyManager.java:155)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.TaskManager.resolveDependencies(TaskManager.java:364)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager$9.call(VariantManager.java:636)
22:19:10.657 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager$9.call(VariantManager.java:633)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.profile.SpanRecorders.record(SpanRecorders.java:44)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager.createVariantData(VariantManager.java:629)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager.createVariantDataForProductFlavors(VariantManager.java:823)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager.populateVariantDataList(VariantManager.java:494)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager$1.call(VariantManager.java:269)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager$1.call(VariantManager.java:266)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:265)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin$11.call(BasePlugin.java:688)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin$11.call(BasePlugin.java:685)
22:19:10.658 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:683)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:608)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:605)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin.lambda$createTasks$1(BasePlugin.java:603)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
22:19:10.659 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.proxy.$Proxy12.afterEvaluate(Unknown Source)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] ... 44 more
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'default' not found.
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.createNotFoundException(DefaultConfigurationContainer.java:92)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:229)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.java:82)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.java:37)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency.getProjectConfiguration(DefaultProjectDependency.java:69)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency_Decorated.getProjectConfiguration(Unknown Source)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.ProjectIvyDependencyDescriptorFactory.createDependencyDescriptor(ProjectIvyDependencyDescriptorFactory.java:40)
22:19:10.660 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.DefaultDependencyDescriptorFactory.createDependencyDescriptor(DefaultDependencyDescriptorFactory.java:35)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.DefaultDependenciesToModuleDescriptorConverter.addDependencies(DefaultDependenciesToModuleDescriptorConverter.java:43)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.DefaultDependenciesToModuleDescriptorConverter.addDependencyDescriptors(DefaultDependenciesToModuleDescriptorConverter.java:36)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.DefaultConfigurationComponentMetaDataBuilder.addDependencies(DefaultConfigurationComponentMetaDataBuilder.java:51)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.DefaultConfigurationComponentMetaDataBuilder.addConfigurations(DefaultConfigurationComponentMetaDataBuilder.java:39)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.toRootComponentMetaData(DefaultConfiguration.java:557)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$DefaultResolveContextToComponentResolver.resolve(DefaultArtifactDependencyResolver.java:144)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:74)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:90)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:80)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
22:19:10.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:80)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:41)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:39)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:91)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver.resolve(SelfResolvingDependencyConfigurationResolver.java:40)
22:19:10.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolve(ShortCircuitEmptyConfigurationResolver.java:52)
22:19:10.663 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver.java:43)
22:19:10.663 [ERROR] [org.gradle.BuildExceptionReporter] ... 84 more
22:19:10.663 [ERROR] [org.gradle.BuildExceptionReporter]
22:19:10.663 [LIFECYCLE] [org.gradle.BuildResultLogger]
22:19:10.663 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
22:19:10.663 [LIFECYCLE] [org.gradle.BuildResultLogger]
22:19:10.663 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 13.531 secs
我尝试在Android Studio中打开android文件夹,然后转到工具 - > Android - >使用Gradle文件同步项目,我在控制台中看到相同的错误:
Gradle 'android' project refresh failed
Error:Configuration with name 'default' not found.
不确定我做错了什么。
感谢任何帮助。
由于 Sateesh
答案 0 :(得分:3)
>check dependencies in the "build.gradle".
>file path is "android/app/build.gradle"
>you may uninstalled some modules.
>so you need to check dependencies in the "bukld.gradle" file.
>if there is one modules which you uninstalled see the dependencies list, you need to delete this module line CHECK IN "
示例:
dependencies {
compile project(':react-native-network-info')
compile project(':react-native-camera')
compile project(':react-native-vector-icons')
compile project(':react-native-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
答案 1 :(得分:0)
如果您仍然无法使用此功能,请尝试删除您的" /项目名称/ android"目录,然后执行以下操作:
react-native run-android
react-native link
react-native start