之前由于电脑没电导致自动关机,重新开机打开Android Studio后无法build项目了,报了以下这个错误:
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
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.
网上找了下资料,预计是native-platform.dll这个文件出了问题,定位这个文件的位置,一般在C:\Users<你自己的用户名>.gradle\native中
打开23(你自己的gradle版本),如果只有一个native-platform.dll.lock文件,只要将这个文件后缀.lock删掉即可。