NoClassDefFoundError:com/android/build/gradle/internal/ToolingRegistryProvider

编程入门 行业动态 更新时间:2024-10-26 23:31:25
本文介绍了NoClassDefFoundError:com/android/build/gradle/internal/ToolingRegistryProvider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个现在无法构建的Android项目:

I have an Android project that is now failing to build:

FAILURE: Build failed with an exception. * Where: Build file 'build.gradle' line: 28 * What went wrong: A problem occurred evaluating root project 'X'. > java.lang.NoClassDefFoundError: com/android/build/gradle/internal/ToolingRegistryProvider * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED

该项目的构建良好,并具有以下依赖项:

The project was building fine with the following dependencies:

'com.android.tools.build:gradle:2.1.3' 'com.android.tools.build:gradle-experimental:0.7.3'

一位同事应用了AndroidStudio提供的更新.这将插件版本更改为:

A coworker applied the updates offered by AndroidStudio. That changed the plugin versions to:

'com.android.tools.build:gradle:2.2.0' 'com.android.tools.build:gradle-experimental:0.8.0'

此更新后,项目在其开发机器上成功构建 (Windows 7)和我的(Ubuntu 16.04).该错误发生在Jenkins版本上 服务器(Ubuntu 16.04).我在构建服务器上安装了Android SDK组件的可用更新,但错误仍然存​​在.

After this update, the project builds successfully on his development machine (Windows 7) and on mine (Ubuntu 16.04). The error occurs on the Jenkins build server (Ubuntu 16.04). I installed the available updates to the Android SDK components on the build server but the error persists.

对"ToolingRegistryProvider" 的Google搜索返回您的搜索没有匹配文档".

A google search for "ToolingRegistryProvider" returns "Your search matches no documents".

推荐答案

此问题已解决,方法是删除构建服务器上的gradle模块缓存,然后让构建重新下载所有内容.

The problem was resolved by deleting gradle's module cache on the build server and then letting the build re-download everything.

rm -r ~/.gradle/caches/modules-2

更多推荐

NoClassDefFoundError:com/android/build/gradle/internal/ToolingRegistryProvider

本文发布于:2023-05-25 10:51:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/226574.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:build   android   NoClassDefFoundError   ToolingRegistryProvider   internal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!