我在android studio中遇到以下错误:“使用Gradle文件同步项目”
位置如下:
2.Android Studio:C:\ Program Files \ Android \ Android Studio \
3.Android Studio项目:C:\ Users \ James \ AndroidStudioProjects \ Test-app \
4。文件夹“ .android”,“。AndroidStudio3.6”,“。gradle”,“ AndroidStudioProjects”的位置:C:\ Users \ James \
5.C:\ Users \ James \ AppData \ Roaming \ npm \ node_modules \
6.C:\ Users \ James \ AndroidStudioProjects \ Test-app \ node_modules @ react-native-community \ cli-platform-android
7.C:\ Users \ James \ AndroidStudioProjects \ Test-app \ node_modules @ react-native-community \ cli-tools
版本:
错误:
Caused by: java.lang.Exception: internal/modules/cjs/loader.js:983 throw err; ^Error: Cannot find module 'react-native/cli'Require stack:- C:\Users\James\Test-app\android[eval] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15) at Function.Module._load (internal/modules/cjs/loader.js:862:27) at Module.require (internal/modules/cjs/loader.js:1042:19) at require
(internal/modules/cjs/helpers.js:77:18) at [eval]:1:13 at Script.runInThisContext (vm.js:120:20) at Object.runInThisContext (vm.js:311:38) at Object. ([eval]-wrapper:10:26) at Module._compile (internal/modules/cjs/loader.js:1156:30) at evalScript (internal/process/execution.js:94:25) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\James\Test-app\android\[eval]' ]}