Android Studio 2.3.2由于错误错误无法构建项目:任务失败:应用程序:dataBindingProcessLayoutsDebug

时间:2021-02-18 23:00:54

Android studio gradle build error occurred after gradle build crashed a few times:

Android studio gradle构建错误发生在gradle构建崩溃几次之后:

Error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'.

错误:任务执行失败:app:dataBindingProcessLayoutsDebug。

Unknown constant tag 111 in class file org/antlr/v4/runtime/CommonTokenFactory

类文件org/antlr/v4/runtime/CommonTokenFactory中未知的常量标签111

Environment:

环境:

Mac OSX Yosemite

Mac OSX约塞米蒂

Android Studio 2.3.2

2.3.2 Android工作室

JAVA 6 (downgraded due to constant AS crashes and failed to startup AS)

JAVA 6(由于崩溃而降级,并没有启动)

Gradle-3.3 (gradle/wrapper/gradle-3.3)

gradle - 3.3(gradle /包装/ gradle - 3.3)

com.android.tools.build:gradle:2.3.2

2.3.2 com.android.tools.build:gradle:

buildToolsVersion '25.0.3'

buildToolsVersion 25.0.3”

I've tried reinstalling AS and also recovering my java and xml layout files to a previous working version but with no luck.

我试过重新安装AS,也试过将java和xml布局文件恢复到以前的工作版本,但运气不佳。

Anyone has experienced the same issue?

有人遇到过同样的问题吗?

1 个解决方案

#1


0  

I was able to clean and build project again after downloading gradle wrapper 3.5 from https://gradle.org/releases and placing the extracted files in gradle/wrapper, update the gradle wrapper in AS Preferences > Build, Execution, Deployment > Gradle > select use Local gradle distribution > set Gradle home: /path_to/gradle/wrapper/gradle-3.5 > Apply and restart AS > clean and build project.

我能够清洁并建立项目后再从https://gradle.org/releases下载gradle包装3.5和gradle将提取文件/包装器,更新gradle包装作为首选项>构建、执行、部署> gradle >选择使用本地gradle分布>设置gradle:/ path_to gradle /包装/ gradle - 3.5 >应用并重启>清洁和构建项目。

#1


0  

I was able to clean and build project again after downloading gradle wrapper 3.5 from https://gradle.org/releases and placing the extracted files in gradle/wrapper, update the gradle wrapper in AS Preferences > Build, Execution, Deployment > Gradle > select use Local gradle distribution > set Gradle home: /path_to/gradle/wrapper/gradle-3.5 > Apply and restart AS > clean and build project.

我能够清洁并建立项目后再从https://gradle.org/releases下载gradle包装3.5和gradle将提取文件/包装器,更新gradle包装作为首选项>构建、执行、部署> gradle >选择使用本地gradle分布>设置gradle:/ path_to gradle /包装/ gradle - 3.5 >应用并重启>清洁和构建项目。