Reputation: 379
i got error when i start "react-native run-android"
do anyone can help me ?
FAILURE: Build failed with an exception.
Where: Script 'C:\Users\wayan\Desktop\android\app\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 191
What went wrong: A problem occurred evaluating settings 'app'.
Unable to determine the current character, it is not a string, number, array, or object
The current character read is 'E' with an int value of 69 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0 Error: EPERM: operation not permitted, scandir 'C:/Users/wayan/Desktop/android/app/android/app/build/intermediates/signing_config/debug/out/signing-config.json' at Object.readdirSync (fs.js:795:3) at GlobSync._readdir (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:288:41) at GlobSync._readdirInGlobStar (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:267:20) at GlobSync._readdir (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:276:17) at GlobSync._processReaddir (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:137:22) at GlobSync._process (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:132:10) at GlobSync._processGlobStar (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:380:10) at GlobSync._process (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:130:10) at GlobSync._processGlobStar (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:383:10) at GlobSync._process (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:130:10) ^
FAILURE: Build failed with an exception.
Where: Script 'C:\Users\wayan\Desktop\android\app\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 191
What went wrong: A problem occurred evaluating settings 'app'.
Unable to determine the current character, it is not a string, number, array, or object
The current character read is 'E' with an int value of 69 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0 Error: EPERM: operation not permitted, scandir 'C:/Users/wayan/Desktop/android/app/android/app/build/intermediates/signing_config/debug/out/signing-config.json' at Object.readdirSync (fs.js:795:3) at GlobSync._readdir (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:288:41) at GlobSync._readdirInGlobStar (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:267:20) at GlobSync._readdir (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:276:17) at GlobSync._processReaddir (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:137:22) at GlobSync._process (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:132:10) at GlobSync._processGlobStar (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:380:10) at GlobSync._process (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:130:10) at GlobSync._processGlobStar (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:383:10) at GlobSync._process (C:\Users\wayan\Desktop\android\app\node_modules\glob\sync.js:130:10) ^
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Upvotes: 0
Views: 8165
Reputation: 91
Go to android/app/build/intermediates/signin-config/debug/out/
and delete signin-config.json
. Use your file explorer because it might be hidden by your code editor. I couldn't see mine in VS Code. After deletion, run react-native run-android
again. It might fix your problem.
Upvotes: 4
Reputation: 223
I can not comment yet so hoping this may fix your problem.
Did you upgrade your React-Native recently? It seems to be a problem with your cli tools not being able to find the root of your android folder. In a nutshell, all you have to (hopefully that's the issue) do is, add the sourceDir
to your native.config.js
.
This would be a good time to mention that link
will deprecate the use of rnpm
in your package.json
file. As the documentation suggests, you will have to create a new file (if not already) in your project root directory.
So in your project root directory, create a new file named native.config.js
. And inside the folder, you may define the sourceDir
which will link to your android folder of the project.
Like so:
module.exports = {
project: {
ios: {},
android: {
//This link will change according to your android file location. That is if you have a custom directory
"sourceDir": "./android/app/src",
//Additionally, you could define the package name
"packageName":"com.wayan.app"
},
},
//assets: ['./assets/fonts'],
};
So suppose your android folder is called something else, you can replace the sourceDir
with the link to your android/app/src
directory.
Now try react-native link
and re-try react-native run-android
Going through your code, the line says Script 'C:\Users\wayan\Desktop\android\app\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 191
. So I am assuming that your project name is called app inside android folder?
Here is the LINK to the official guide for autolink. Hope this helps. Happy Coding :)
Upvotes: 2