Android studio Run with --stacktrace option to get the stack trace. Run with --info or --debu
提示信息
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
其实是让你去查看更多的log信息。找到你项目的根目录,比如你的项目是MyApplication,在dos命令下进入该目录执行
gradlew compileDebug --stacktrace
如果上面的命令不管用,可以使用下面的命令试试
gradle compileDebug --stacktrace
可以看到很多错误的信息输出出来。
E:\MyApplication>gradle compileDebug --stacktrace FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'MyApplication'. > Could not resolve all dependencies for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:1.0.0. Required by: :MyApplication:unspecified > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradl e/1.0.0/gradle-1.0.0.pom'. > Connection to https://jcenter.bintray.com refused * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle.api.ProjectConfigurationException: A problem occurred configuring roo t project 'MyApplication'. at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigu rationFailure(LifecycleProjectEvaluator.java:91) at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L ifecycleProjectEvaluator.java:61) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj ect.java:504) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj ect.java:83) at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(Task PathProjectEvaluator.java:42) at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuil dConfigurer.java:35) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default GradleLauncher.java:129) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle Launcher.java:106) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun cher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon troller.run(InProcessBuildActionExecuter.java:80) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav a:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav a:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce ssBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce ssBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav a:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction. execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction. execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti meValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti meValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute( CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute( CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep ortingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep ortingAction.java:22) 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(ProcessBoots trap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j ava:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all depe ndencies for configuration ':classpath'. at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfigurat ion.rethrowFailure(DefaultLenientConfiguration.java:52) at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfigura tion.rethrowFailure(DefaultResolvedConfiguration.java:36) at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyR esolver$FilesAggregatingResolvedConfiguration.rethrowFailure(SelfResolvingDepend encyResolver.java:110) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep endencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingA rtifactDependencyResolver.java:180) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ConfigurationFileCollection.getFiles(DefaultConfiguration.java:444) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration .getFiles(DefaultConfiguration.java:205) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration _Decorated.getFiles(Unknown Source) at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.defineS criptHandlerClassScope(DefaultPluginRequestApplicator.java:142) at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPl ugins(DefaultPluginRequestApplicator.java:60) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl. apply(DefaultScriptPluginFactory.java:131) at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildSc riptProcessor.java:39) at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildSc riptProcessor.java:26) at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.eva luate(ConfigureActionsProjectEvaluator.java:34) at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L ifecycleProjectEvaluator.java:59) ... 27 more Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:1.0.0. Required by: :MyApplication:unspecified at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.resolve(RepositoryChainDependencyResolver.java:81) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inAdapter.resolve(RepositoryChainAdapter.java:69) at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModul eResolver.resolve(ClientModuleResolver.java:44) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java :577) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder. java:587) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphB uilder.java:272) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBu ilder.java:246) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:156) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder.resolveDependencyGraph(DependencyGraphBuilder.java:94) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder.resolve(DependencyGraphBuilder.java:84) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep endencyResolver$1.execute(DefaultDependencyResolver.java:122) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep endencyResolver$1.execute(DefaultDependencyResolver.java:88) at org.gradle.internal.Transformers$4.transform(Transformers.java:136) at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager .withIvy(DefaultIvyContextManager.java:61) at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager .withIvy(DefaultIvyContextManager.java:39) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep endencyResolver.resolve(DefaultDependencyResolver.java:88) at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe ndencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:42) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc ess.java:187) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc ess.java:175) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(De faultPersistentDirectoryStore.java:106) at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache. useCache(DefaultCacheFactory.java:187) at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManag er.useCache(DefaultCacheLockingManager.java:64) at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe ndencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:40) at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyR esolver.resolve(SelfResolvingDependencyResolver.java:45) at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigs ArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyRes olver.java:55) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep endencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:47) at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationReso lver.resolve(DefaultConfigurationResolver.java:46) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration .resolveNow(DefaultConfiguration.java:250) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration .getResolvedConfiguration(DefaultConfiguration.java:240) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration _Decorated.getResolvedConfiguration(Unknown Source) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ConfigurationFileCollection.getFiles(DefaultConfiguration.java:442) ... 36 more Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Cou ld not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.0.0/gra dle-1.0.0.pom'. at org.gradle.internal.resource.transport.http.HttpClientHelper.performR equest(HttpClientHelper.java:80) at org.gradle.internal.resource.transport.http.HttpClientHelper.performR awGet(HttpClientHelper.java:66) at org.gradle.internal.resource.transport.http.HttpClientHelper.performG et(HttpClientHelper.java:70) at org.gradle.internal.resource.transport.http.HttpResourceAccessor.getR esource(HttpResourceAccessor.java:53) at org.gradle.internal.resource.transport.http.HttpResourceAccessor.getR esource(HttpResourceAccessor.java:36) at org.gradle.internal.resource.transfer.ProgressLoggingExternalResource Accessor.getResource(ProgressLoggingExternalResourceAccessor.java:39) at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResour ceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:72) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExtern alResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifac tResolver.java:91) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExtern alResourceArtifactResolver.resolveMetaDataArtifact(DefaultExternalResourceArtifa ctResolver.java:57) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResou rceResolver.parseMetaDataFromArtifact(ExternalResourceResolver.java:162) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResou rceResolver.resolveStaticDependency(ExternalResourceResolver.java:141) at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver .doResolveComponentMetaData(MavenResolver.java:82) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResou rceResolver$RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceReso lver.java:391) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockRele asingModuleComponentsRepository$LockReleasingRepositoryAccess$2.run(CacheLockRel easingModuleComponentsRepository.java:65) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(Def aultCacheAccess.java:237) at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(Def aultCacheAccess.java:308) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunning Operation(DefaultPersistentDirectoryStore.java:114) at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache. longRunningOperation(DefaultCacheFactory.java:179) at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManag er.longRunningOperation(DefaultCacheLockingManager.java:56) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockRele asingModuleComponentsRepository$LockReleasingRepositoryAccess.resolveComponentMe taData(CacheLockReleasingModuleComponentsRepository.java:63) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModule ComponentRepository$ResolveAndCacheRepositoryAccess.resolveComponentMetaData(Cac hingModuleComponentRepository.java:284) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleCom ponentRepositoryAccess.resolveComponentMetaData(BaseModuleComponentRepositoryAcc ess.java:38) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMe moryCachedModuleComponentRepository$CachedAccess.resolveComponentMetaData(InMemo ryCachedModuleComponentRepository.java:70) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMeta DataResolveState.process(ComponentMetaDataResolveState.java:70) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMeta DataResolveState.resolve(ComponentMetaDataResolveState.java:62) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.findBestMatch(RepositoryChainDependencyResolver.java:114) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.findBestMatch(RepositoryChainDependencyResolver.java:97) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.resolve(RepositoryChainDependencyResolver.java:70) ... 67 more Caused by: org.apache.http.conn.HttpHostConnectException: Connection to https:// jcenter.bintray.com refused at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect ion(DefaultClientConnectionOperator.java:190) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedCli entConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(Default RequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultReq uestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl ient.java:906) at org.apache.http.impl.client.DecompressingHttpClient.execute(Decompres singHttpClient.java:137) at org.apache.http.impl.client.DecompressingHttpClient.execute(Decompres singHttpClient.java:118) at org.gradle.internal.resource.transport.http.HttpClientHelper.performH ttpRequest(HttpClientHelper.java:111) at org.gradle.internal.resource.transport.http.HttpClientHelper.executeG etOrHead(HttpClientHelper.java:87) at org.gradle.internal.resource.transport.http.HttpClientHelper.performR equest(HttpClientHelper.java:78) ... 95 more Caused by: java.net.ConnectException: Connection timed out: connect at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFact ory.java:549) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect ion(DefaultClientConnectionOperator.java:180) ... 104 more BUILD FAILED Total time: 45.485 secs
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索android
, studio
, run
, with
, with...错误
--stacktrace
printstacktrace、stacktrace、stack trace、printstacktrace缺点、c stacktrace,以便于您获取更多的相关知识。
时间: 2024-10-24 09:22:22