异常:Failed to load native library 'native-platform.dll' for Windows 10 x86

来源:互联网 发布:数据分析平台页面设计 编辑:程序博客网 时间:2024/06/06 05:09

异常信息

D:\GitHub\spring-framework\spring-core>gradle clean

FAILURE: Build failed with an exception.

* What went wrong:
Failed to load native library 'native-platform.dll' for Windows 10 x86.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


异常现象

之前一直可以用gradle构建项目,今天在构建spring源码时出现如下异常:


按照异常提示输出异常堆栈,没有信息输出:


异常原因

根据错误提示是找不到文件native-platform.dll,查看当前用户目录下的.gradle文件,发现native-platform.dll文件变成了native-platform.dll.lock:



解决办法

1:把native-platform.dll.lock文件改成native-platform.dll即可



2:删除当前用户目录下.gradle文件内所有文件,重新下载最新版本gradle,并配置环境变量。


解决方法二选一。



阅读全文
0 0
原创粉丝点击