NoClassDefFoundError:com/android/build/gradle/internal/ToolingRegistryProvider [英] NoClassDefFoundError: com/android/build/gradle/internal/ToolingRegistryProvider

查看:259
本文介绍了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆