我对找不到答案的内容有一个奇怪的错误。
在我的课程上做了一些导入(下面的代码)
package info.zajacmp3.servercommunication;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
/**
* Created by Mateusz on 04.06.13.
*/
public class ServerCommunication {
public static boolean isSendableOverInternet(){
return false;
}
}
我得到了gradle错误:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':PPMMessenger:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
当我运行堆栈跟踪时,它没有告诉我任何事情......因为我的代码没有任何跟踪。
这是一个堆栈跟踪:
* Try:
Run gradlew tasks to get a list of available tasks.
* Exception is:
org.gradle.execution.TaskSelectionException: Task 'compileDebug' not found in ro
ot project 'Mateusz'.
at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:67)
at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(Com
mandLineTaskParser.java:41)
at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.doSele
ct(TaskNameResolvingBuildConfigurationAction.java:65)
at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.config
ure(TaskNameResolvingBuildConfigurationAction.java:47)
at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecu
ter.java:42)
at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExec
uter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecu
ter.java:48)
at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.co
nfigure(ExcludedTaskFilteringBuildConfigurationAction.java:46)
at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecu
ter.java:42)
at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExec
uter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecu
ter.java:48)
at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(Defau
ltTasksBuildExecutionAction.java:38)
at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecu
ter.java:42)
at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter
.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:155)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:64)
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:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions
.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:139)
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:48)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:39)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
va:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
BUILD FAILED
Total time: 2.368 secs
任何帮助表示赞赏。我在这里看不到任何可以帮助我解决这个问题的事情。
答案 0 :(得分:1)
刚出现这个问题,我需要将自定义jar库添加到build.gradle文件中:
dependencies {
compile files('libs/android-support-v4.jar')
ADD FILE HERE
}