2017-04-10 31 views
0

我谈论这个入门套件here本机初学者工具包将无法正常运行

我做了什么:

  1. 克隆回购到本地文件夹
  2. 光盘放入文件夹,运行npm install
  3. 运行react-native link
  4. 运行react-native run-android
  5. 运行react-native run-android再次

我得到了什么:

错误的阵营打包

Looking for JS files in 
    D:\Projects\ReactNative\native-starter-kit 

Loading dependency graph... 
React packager ready. 

Loading dependency graph, done. 
Bundling `index.android.js` 100.0% (974/974), done. 
ERROR EPERM: operation not permitted, lstat 'D:\Projects\ReactNative\native-starter-kit\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml' 
{"errno":-4048,"code":"EPERM","syscall":"lstat","path":"D:\\Projects\\ReactNative\\native-starter-kit\\android\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values\\values.xml"} 
Error: EPERM: operation not permitted, lstat 'D:\Projects\ReactNative\native-starter-kit\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml' 
    at Error (native) 

See http://facebook.github.io/react-native/docs/troubleshooting.html 
for common problems and solutions. 
Press any key to continue . . . 

我不能让我的设备上正常部署示例项目。请注意,我运行了两次react-native run-android。 第一次,捆绑完成,但我的设备只显示白色背景,没有任何东西。然后我尝试再次运行它。 第二,反应包装商得到了一个错误。

对此有何想法?

回答

1

目录更改为项目的Android文件夹:

cd /path/to/project/android 
gradlew clean 
react-native run-android again.