下面是gradle StackTrace:
org.gradle.internal.service.ServiceCreationException: Could not create service of type DefaultClassLoaderRegistry using GlobalScopeServices.createClassLoaderRegistry().
at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:643)
at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:597)
at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectProvider.getInstance(DefaultServiceRegistry.java:439)
at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:479)
at org.gradle.internal.service.DefaultServiceRegistry.findConfigureMethod(DefaultServiceRegistry.java:145)
at org.gradle.internal.service.DefaultServiceRegistry.findProviderMethods(DefaultServiceRegistry.java:119)
at org.gradle.internal.service.DefaultServiceRegistry.addProvider(DefaultServiceRegistry.java:227)
at org.gradle.internal.service.ServiceRegistryBuilder.build(ServiceRegistryBuilder.java:52)
at org.gradle.launcher.cli.BuildActionsFactory.runBuildInProcess(BuildActionsFactory.java:167)
at org.gradle.launcher.cli.BuildActionsFactory.createAction(BuildActionsFactory.java:137)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.createAction(CommandLineActionFactory.java:242)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:232)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.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(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: org.gradle.internal.service.UnknownServiceException: Could not find meta-data resource 'META-INF/services/javax.xml.datatype.DatatypeFactory' for service 'javax.xml.datatype.DatatypeFactory'.
at org.gradle.internal.service.ServiceLocator.getFactory(ServiceLocator.java:56)
at org.gradle.internal.classloader.DefaultClassLoaderFactory.makeServiceVisible(DefaultClassLoaderFactory.java:104)
at org.gradle.internal.classloader.DefaultClassLoaderFactory.createFilteringClassLoader(DefaultClassLoaderFactory.java:76)
at org.gradle.initialization.DefaultClassLoaderRegistry.restrictToGradleApi(DefaultClassLoaderRegistry.java:50)
at org.gradle.initialization.DefaultClassLoaderRegistry.<init>(DefaultClassLoaderRegistry.java:40)
at org.gradle.internal.service.scopes.GlobalScopeServices.createClassLoaderRegistry(GlobalScopeServices.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.internal.service.DefaultServiceRegistry.invoke(DefaultServiceRegistry.java:328)
at org.gradle.internal.service.DefaultServiceRegistry.access$1200(DefaultServiceRegistry.java:58)
at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:641)
... 27 more
我也遇到过同样的问题,并且阅读了Gradle的全堆栈痕迹,发现缺少了一个罐子。其他丢失的JAR(如果有的话)将在整个堆栈跟踪中列出。
问题中的jar是commons-lang3.jar,它是Gradle所需要的。我在下面的步骤中安装了罐子
sudo apt-get install libcommons-lang3-java
然后我又运行了gradle,它运行得很好。
我接手了一个项目,它不编译。当我构建它时,我得到了以下错误: 已存在的程序类型:com.google.gson.exclusionStrategy 下面是该项目的构建。gradle应用插件:'com.android.application'
我从这里下载了官方的OSMdroid示例。https://github.com/osmdroid/osmdroid,无法在最新的Eclipse IDE和Android SDK上编译osmdroid-android-it Android应用程序。我尝试了API 10和17。 尽管如此,osmdroid-android-it项目不识别src文件夹下的OSMDROID库。 我需要的是自定义MBTiles
当我尝试构建我的项目时,我遇到了这些错误,它似乎认为我有两个相同的库,但我不确定为什么: 这是我的build.gradle文件 这是我的顶级gradle构建文件: { } 我想这个错误发生在升级到Android Studio后,但我不记得了。我的Android Studio版本现在是3.2.1。我能够让这个项目以前建立。
我正在尝试在Androidstudio 0.8上的ubuntu 14.04上构建iosched应用程序。导入设置后。gradle文件,按照构建指令,我得到一个错误 这篇文章中提到的解决方案也不起作用。
我试图在android studio 3.1中导入一个项目,但当我尝试构建该项目时,它会显示“在根项目中找不到任务‘汇编’”。我搜索了这个错误,但没有找到直接的答案,像这样的答案对我来说并不适用。有什么解决办法吗? [已解决]:问题是因为缺少设置。格雷德尔档案!只是手动将其添加到主项目文件夹中
当我尝试和建立这种情况发生时,你能帮我吗?