Android studio 出现错误Run with --stacktrace option to get the stack trace. Run with --info or --debu
AndroidstudioRunwith--stacktraceoptiontogetthestacktrace.Runwith--infoor--debu
提示信息
Runwith--stacktraceoptiontogetthestacktrace.Runwith--infoor--debugoptiontogetmorelogoutput.
其实是让你去查看更多的log信息。找到你项目的根目录,比如你的项目是MyApplication,在dos命令下进入该目录执行
gradlewcompileDebug--stacktrace
如果上面的命令不管用,可以使用下面的命令试试
gradlecompileDebug--stacktrace
可以看到很多错误的信息输出出来。
E:\MyApplication>gradlecompileDebug--stacktrace FAILURE:Buildfailedwithanexception. *Whatwentwrong: Aproblemoccurredconfiguringrootproject'MyApplication'. >Couldnotresolvealldependenciesforconfiguration':classpath'. >Couldnotresolvecom.android.tools.build:gradle:1.0.0. Requiredby: :MyApplication:unspecified >CouldnotGET'https://jcenter.bintray.com/com/android/tools/build/gradl e/1.0.0/gradle-1.0.0.pom'. >Connectiontohttps://jcenter.bintray.comrefused *Try: Runwith--infoor--debugoptiontogetmorelogoutput. *Exceptionis: org.gradle.api.ProjectConfigurationException:Aproblemoccurredconfiguringroo tproject'MyApplication'. atorg.gradle.configuration.project.LifecycleProjectEvaluator.addConfigu rationFailure(LifecycleProjectEvaluator.java:91) atorg.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L ifecycleProjectEvaluator.java:61) atorg.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj ect.java:504) atorg.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj ect.java:83) atorg.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(Task PathProjectEvaluator.java:42) atorg.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuil dConfigurer.java:35) atorg.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default GradleLauncher.java:129) atorg.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle Launcher.java:106) atorg.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun cher.java:86) atorg.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon troller.run(InProcessBuildActionExecuter.java:80) atorg.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav a:33) atorg.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav a:24) atorg.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce ssBuildActionExecuter.java:36) atorg.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce ssBuildActionExecuter.java:26) atorg.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) atorg.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav a:171) atorg.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction. execute(CommandLineActionFactory.java:237) atorg.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction. execute(CommandLineActionFactory.java:210) atorg.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti meValidationAction.java:35) atorg.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti meValidationAction.java:24) atorg.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute( CommandLineActionFactory.java:206) atorg.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute( CommandLineActionFactory.java:169) atorg.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep ortingAction.java:33) atorg.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep ortingAction.java:22) atorg.gradle.launcher.Main.doAction(Main.java:33) atorg.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) atorg.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots trap.java:54) atorg.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j ava:35) atorg.gradle.launcher.GradleMain.main(GradleMain.java:23) Causedby:org.gradle.api.artifacts.ResolveException:Couldnotresolvealldepe ndenciesforconfiguration':classpath'. atorg.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfigurat ion.rethrowFailure(DefaultLenientConfiguration.java:52) atorg.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfigura tion.rethrowFailure(DefaultResolvedConfiguration.java:36) atorg.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyR esolver$FilesAggregatingResolvedConfiguration.rethrowFailure(SelfResolvingDepend encyResolver.java:110) atorg.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep endencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingA rtifactDependencyResolver.java:180) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ConfigurationFileCollection.getFiles(DefaultConfiguration.java:444) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration .getFiles(DefaultConfiguration.java:205) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration _Decorated.getFiles(UnknownSource) atorg.gradle.plugin.use.internal.DefaultPluginRequestApplicator.defineS criptHandlerClassScope(DefaultPluginRequestApplicator.java:142) atorg.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPl ugins(DefaultPluginRequestApplicator.java:60) atorg.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl. apply(DefaultScriptPluginFactory.java:131) atorg.gradle.configuration.project.BuildScriptProcessor.execute(BuildSc riptProcessor.java:39) atorg.gradle.configuration.project.BuildScriptProcessor.execute(BuildSc riptProcessor.java:26) atorg.gradle.configuration.project.ConfigureActionsProjectEvaluator.eva luate(ConfigureActionsProjectEvaluator.java:34) atorg.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L ifecycleProjectEvaluator.java:59) ...27more Causedby:org.gradle.internal.resolve.ModuleVersionResolveException:Couldnot resolvecom.android.tools.build:gradle:1.0.0. Requiredby: :MyApplication:unspecified atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.resolve(RepositoryChainDependencyResolver.java:81) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inAdapter.resolve(RepositoryChainAdapter.java:69) atorg.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModul eResolver.resolve(ClientModuleResolver.java:44) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java :577) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder. java:587) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphB uilder.java:272) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBu ilder.java:246) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:156) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder.resolveDependencyGraph(DependencyGraphBuilder.java:94) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.Depe ndencyGraphBuilder.resolve(DependencyGraphBuilder.java:84) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep endencyResolver$1.execute(DefaultDependencyResolver.java:122) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep endencyResolver$1.execute(DefaultDependencyResolver.java:88) atorg.gradle.internal.Transformers$4.transform(Transformers.java:136) atorg.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager .withIvy(DefaultIvyContextManager.java:61) atorg.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager .withIvy(DefaultIvyContextManager.java:39) atorg.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep endencyResolver.resolve(DefaultDependencyResolver.java:88) atorg.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe ndencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:42) atorg.gradle.internal.Factories$1.create(Factories.java:22) atorg.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc ess.java:187) atorg.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc ess.java:175) atorg.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(De faultPersistentDirectoryStore.java:106) atorg.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache. useCache(DefaultCacheFactory.java:187) atorg.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManag er.useCache(DefaultCacheLockingManager.java:64) atorg.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe ndencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:40) atorg.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyR esolver.resolve(SelfResolvingDependencyResolver.java:45) atorg.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigs ArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyRes olver.java:55) atorg.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep endencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:47) atorg.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationReso lver.resolve(DefaultConfigurationResolver.java:46) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration .resolveNow(DefaultConfiguration.java:250) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration .getResolvedConfiguration(DefaultConfiguration.java:240) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration _Decorated.getResolvedConfiguration(UnknownSource) atorg.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ConfigurationFileCollection.getFiles(DefaultConfiguration.java:442) ...36more Causedby:org.gradle.internal.resource.transport.http.HttpRequestException:Cou ldnotGET'https://jcenter.bintray.com/com/android/tools/build/gradle/1.0.0/gra dle-1.0.0.pom'. atorg.gradle.internal.resource.transport.http.HttpClientHelper.performR equest(HttpClientHelper.java:80) atorg.gradle.internal.resource.transport.http.HttpClientHelper.performR awGet(HttpClientHelper.java:66) atorg.gradle.internal.resource.transport.http.HttpClientHelper.performG et(HttpClientHelper.java:70) atorg.gradle.internal.resource.transport.http.HttpResourceAccessor.getR esource(HttpResourceAccessor.java:53) atorg.gradle.internal.resource.transport.http.HttpResourceAccessor.getR esource(HttpResourceAccessor.java:36) atorg.gradle.internal.resource.transfer.ProgressLoggingExternalResource Accessor.getResource(ProgressLoggingExternalResourceAccessor.java:39) atorg.gradle.internal.resource.transfer.DefaultCacheAwareExternalResour ceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:72) atorg.gradle.api.internal.artifacts.repositories.resolver.DefaultExtern alResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifac tResolver.java:91) atorg.gradle.api.internal.artifacts.repositories.resolver.DefaultExtern alResourceArtifactResolver.resolveMetaDataArtifact(DefaultExternalResourceArtifa ctResolver.java:57) atorg.gradle.api.internal.artifacts.repositories.resolver.ExternalResou rceResolver.parseMetaDataFromArtifact(ExternalResourceResolver.java:162) atorg.gradle.api.internal.artifacts.repositories.resolver.ExternalResou rceResolver.resolveStaticDependency(ExternalResourceResolver.java:141) atorg.gradle.api.internal.artifacts.repositories.resolver.MavenResolver .doResolveComponentMetaData(MavenResolver.java:82) atorg.gradle.api.internal.artifacts.repositories.resolver.ExternalResou rceResolver$RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceReso lver.java:391) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockRele asingModuleComponentsRepository$LockReleasingRepositoryAccess$2.run(CacheLockRel easingModuleComponentsRepository.java:65) atorg.gradle.internal.Factories$1.create(Factories.java:22) atorg.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(Def aultCacheAccess.java:237) atorg.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(Def aultCacheAccess.java:308) atorg.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunning Operation(DefaultPersistentDirectoryStore.java:114) atorg.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache. longRunningOperation(DefaultCacheFactory.java:179) atorg.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManag er.longRunningOperation(DefaultCacheLockingManager.java:56) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockRele asingModuleComponentsRepository$LockReleasingRepositoryAccess.resolveComponentMe taData(CacheLockReleasingModuleComponentsRepository.java:63) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModule ComponentRepository$ResolveAndCacheRepositoryAccess.resolveComponentMetaData(Cac hingModuleComponentRepository.java:284) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleCom ponentRepositoryAccess.resolveComponentMetaData(BaseModuleComponentRepositoryAcc ess.java:38) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMe moryCachedModuleComponentRepository$CachedAccess.resolveComponentMetaData(InMemo ryCachedModuleComponentRepository.java:70) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMeta DataResolveState.process(ComponentMetaDataResolveState.java:70) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMeta DataResolveState.resolve(ComponentMetaDataResolveState.java:62) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.findBestMatch(RepositoryChainDependencyResolver.java:114) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.findBestMatch(RepositoryChainDependencyResolver.java:97) atorg.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryCha inDependencyResolver.resolve(RepositoryChainDependencyResolver.java:70) ...67more Causedby:org.apache.http.conn.HttpHostConnectException:Connectiontohttps:// jcenter.bintray.comrefused atorg.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect ion(DefaultClientConnectionOperator.java:190) atorg.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedCli entConnectionImpl.java:294) atorg.apache.http.impl.client.DefaultRequestDirector.tryConnect(Default RequestDirector.java:640) atorg.apache.http.impl.client.DefaultRequestDirector.execute(DefaultReq uestDirector.java:479) atorg.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl ient.java:906) atorg.apache.http.impl.client.DecompressingHttpClient.execute(Decompres singHttpClient.java:137) atorg.apache.http.impl.client.DecompressingHttpClient.execute(Decompres singHttpClient.java:118) atorg.gradle.internal.resource.transport.http.HttpClientHelper.performH ttpRequest(HttpClientHelper.java:111) atorg.gradle.internal.resource.transport.http.HttpClientHelper.executeG etOrHead(HttpClientHelper.java:87) atorg.gradle.internal.resource.transport.http.HttpClientHelper.performR equest(HttpClientHelper.java:78) ...95more Causedby:java.net.ConnectException:Connectiontimedout:connect atorg.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFact ory.java:549) atorg.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect ion(DefaultClientConnectionOperator.java:180) ...104more BUILDFAILED Totaltime:45.485secs
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!