3

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 ?

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

I try running the "cd android && ./gradlew clean" but its error. it says. '.' is not recognized as an internal or external command
try using one by one i.e. dont use && .try doing stepwise
0

Automatic Method

./android/gradlew clean (Remove ./ in win cmd)

Manual Method

Remove build files from android/build and android/app/build

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.