duheng / Mozi

此项目致力于构建一套最基础,最精简,可维护的react-native项目,支持ios,android 🌹
MIT License
519 stars 93 forks source link

每次重新执行yarn start和yarn run android后都会报错 ,需要执行gradlew clean才会正常 #40

Open heqs opened 4 years ago

heqs commented 4 years ago

报错内容如下 Error: EPERM: operation not permitted, lstat 'G:\MySource\noter\Mozi\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values' Emitted 'error' event at: at NodeWatcher. (G:\MySource\noter\Mozi\node_modules\sane\src\node_watcher.js:289:14) at G:\MySource\noter\Mozi\node_modules\graceful-fs\polyfills.js:284:29 at FSReqWrap.oncomplete (fs.js:154:21) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

然后执行 gradlew clean,重新yarn start和yarn run android就 正常了,不知道为什么会这样

duheng commented 4 years ago

报错内容如下 Error: EPERM: operation not permitted, lstat 'G:\MySource\noter\Mozi\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values' Emitted 'error' event at: at NodeWatcher. (G:\MySource\noter\Mozi\node_modules\sane\src\node_watcher.js:289:14) at G:\MySource\noter\Mozi\node_modules\graceful-fs\polyfills.js:284:29 at FSReqWrap.oncomplete (fs.js:154:21) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

然后执行 gradlew clean,重新yarn start和yarn run android就 正常了,不知道为什么会这样

你用的是Android Studio3.+ ?

heqs commented 4 years ago

我的as版本是3.5.3,貌似只要在命令行执行yarn start和yarn run android吧,需要用到as吗?

duheng commented 4 years ago

我的as版本是3.5.3,貌似只要在命令行执行yarn start和yarn run android吧,需要用到as吗?

这个是模拟器的问题,每次升级Android Studio都会遇到类似问题, 目前你先用安卓机调试开发,或者把Android Studio降级到之前的版本,我后面有空兼容一下。

heqs commented 4 years ago

好的,谢谢大佬