react-native run-android in React Native
I'm new to React Native language, and I'm having difficulty in running the app in Android.
The eror is :
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.>
java.io.IOException: Could not delete path'C:\Users\Documents\projectFolder\android\app\build\generated\source\r\debug\android\support\graphics\drawable'.
and in my package.json
"name": "sampleProject",
"version": "0.1.6",
"private": true,
"scripts": {
"start": "rm -rf __globals__ && cp -fR ../../globals __globals__ && npm run lint && node node_modules/react-native/local-cli/cli.js start",
"ios": "rm -rf __globals__ && cp -fR ../../globals __globals__ && npm run lint && react-native run-ios",
"android": "rm -rf __globals__ && cp -fR ../../globals __globals__ && npm run lint && react-native run-android",
"log-ios": "react-native log-ios",
"log-android": "react-native log-android",
"test": "jest",
"reset": "rm -rf __globals__ && cp -fR ../../globals __globals__ && npm run
lint && node node_modules/react-native/local-cli/cli.js start --reset-
cache",
"lint": "eslint --fix --max-warnings 1 .",
"precommit": "npm run lint"
},
"dependencies": {
"async": "~2.4.1",
"bluebird": "~3.5.0",
"color-term-console": "~1.0.4",
"crypto-js": "~3.1.9-1",
"file-extension": "~3.1.2",
etc ...
what should I do guys ?
Try this:
goto android folder by using command cd android
then run ./gradlew clean
Now go back to your project folder by cd ..
Then react-native run-android
Automatic Method
./android/gradlew clean
(Remove ./ in win cmd)
Manual Method
Remove build files from android/build
and android/app/build
Comments
Post a Comment