由于某些内部Gradle问题,Jenkins的构建失败。 这对Gradle来说似乎是一个安静的问题。
链接:
我的项目不使用Android NDK。
这是 stacktrace :
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':TestLauncher'.
01:02:01 at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
01:02:01 at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
01:02:01 at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
01:02:01 at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:540)
01:02:01 at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:93)
01:02:01 at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
01:02:01 at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:124)
01:02:01 at org.gradle.internal.Factories$1.create(Factories.java:22)
01:02:01 at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
01:02:01 at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:121)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
01:02:01 at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
01:02:01 at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
01:02:01 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
01:02:01 at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
01:02:01 at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
01:02:01 at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
01:02:01 at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
01:02:01 at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
01:02:01 at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
01:02:01 at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
01:02:01 at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
01:02:01 at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
01:02:01 at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
01:02:01 at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
01:02:01 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
01:02:01 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
01:02:01 at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
01:02:01 at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
01:02:01 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
01:02:01 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
01:02:01 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
01:02:01 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
01:02:01 at org.gradle.launcher.Main.doAction(Main.java:33)
01:02:01 at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
01:02:01 at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
01:02:01 at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
01:02:01 at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
01:02:01 at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
01:02:01 at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
01:02:01 at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
01:02:01 Caused by: java.lang.NullPointerException
01:02:01 at com.android.build.gradle.internal.ndk.DefaultNdkInfo.findTargetPlatformVersionOrLower(DefaultNdkInfo.java:167)
01:02:01 at com.android.build.gradle.internal.ndk.DefaultNdkInfo.findLatestPlatformVersion(DefaultNdkInfo.java:89)
01:02:01 at com.android.build.gradle.internal.ndk.NdkHandler.getPlatformVersion(NdkHandler.java:131)
01:02:01 at com.android.build.gradle.internal.ndk.NdkHandler.supports64Bits(NdkHandler.java:234)
01:02:01 at com.android.build.gradle.internal.ndk.NdkHandler.getSupportedAbis(NdkHandler.java:297)
01:02:01 at com.android.build.gradle.internal.transforms.StripDebugSymbolTransform.<init>(StripDebugSymbolTransform.java:86)
01:02:01 at com.android.build.gradle.internal.TaskManager.createStripNativeLibraryTask(TaskManager.java:1342)
01:02:01 at com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantData(ApplicationTaskManager.java:289)
01:02:01 at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:485)
01:02:01 at com.android.build.gradle.internal.VariantManager$3.call(VariantManager.java:293)
01:02:01 at com.android.build.gradle.internal.VariantManager$3.call(VariantManager.java:290)
01:02:01 at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
01:02:01 at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
01:02:01 at com.android.build.gradle.internal.profile.SpanRecorders.record(SpanRecorders.java:44)
01:02:01 at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:286)
01:02:01 at com.android.build.gradle.BasePlugin$11.call(BasePlugin.java:688)
01:02:01 at com.android.build.gradle.BasePlugin$11.call(BasePlugin.java:685)
01:02:01 at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
01:02:01 at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
01:02:01 at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:683)
01:02:01 at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:608)
01:02:01 at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:605)
01:02:01 at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
01:02:01 at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
01:02:01 at com.android.build.gradle.BasePlugin.lambda$createTasks$1(BasePlugin.java:603)
01:02:01 at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
01:02:01 at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
01:02:01 at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
01:02:01 at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
01:02:01 at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
01:02:01 at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
01:02:01 at com.sun.proxy.$Proxy11.afterEvaluate(Unknown Source)
01:02:01 at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
01:02:01 ... 44 more
01:02:01
01:02:01
01:02:01 BUILD FAILED
答案 0 :(得分:1)
我遇到了从React-Native构建初始项目的问题。它似乎是由项目中使用的不同Gradle版本引起的。
更改项目中使用的gradle版本。在/android/build.gradle中
原件:
classpath 'com.android.tools.build:gradle:2.2.3'
修改:
classpath 'com.android.tools.build:gradle:2.3.1'
还在/android/gradle/wrapper/gradle-wrapper.properties中更改Gradle的来源
原件:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
修改:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
希望这可以解决问题。