Unable to build Android using "expo run:android"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react-native
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện expo run:android trong một project mới được tạo bằng create-react-native-app, sau đó kiểm tra node_modules/@react-native-community/cli-platform-android/native_modules.gradle tại dòng 256 và project android được tạo ra. So sánh project bị lỗi với một project cũ hơn build thành công, rồi sử dụng output cấu hình trên console để xác định sự không khớp của project Android. Được xem là hoàn tất khi một project mới tạo build thành công bằng lệnh này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
All recent projects created by "create-react-native-app" are not working with the command "expo run:android".
Old projects that I created before (just 1-2 weeks ago) work well with the same command.
Is there any recent updates or changes related to this?
Error messages are attached below.
This project is a new, bare "create-react-native-app" project that I haven't made any change.
[Error Message on Console]
› Building app...
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
-
Where:
Script 'C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 256 -
What went wrong:
A problem occurred evaluating script.
React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
[root:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022, reactNativePath:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\react-native, dependencies:[expo:[root:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\expo, name:expo, platforms:[ios:[sourceDir:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\expo\ios, folder:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\expo, pbxprojPath:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\expo\ios\Expo.xcodeproj\project.pbxproj, podfile:null, podspecPath:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\expo\ios\Expo.podspec, projectPath:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\node_modules\expo\ios\Expo.xcodeproj, projectName:Expo.xcodeproj, libraryFolder:Libraries, sharedLibraries:[], plist:[], scriptPhases:[], configurations:[]], android:null], assets:[], hooks:[:], params:[]]], commands:[[name:log-ios, description:starts iOS device syslog tail], [name:run-ios, description:builds your app and starts it on iOS simulator, examples:[[desc:Run on a different simulator, e.g. iPhone SE (2nd generation), cmd:react-native run-ios --simulator "iPhone SE (2nd generation)"], [desc:Pass a non-standard location of iOS directory, cmd:react-native run-ios --project-path "./app/ios"], [desc:Run on a connected device, e.g. Max's iPhone, cmd:react-native run-ios --device "Max's iPhone"], [desc:Run on the AppleTV simulator, cmd:react-native run-ios --simulator "Apple TV" --scheme "helloworld-tvOS"]], options:[[name:--simulator , description:Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: "iPhone 6 (10.0)", default:iPhone 13], [name:--configuration , description:Explicitly set the scheme configuration to use, default:Debug], [name:--scheme , description:Explicitly set Xcode scheme to use], [name:--project-path , description:Path relative to project root where the Xcode project (.xcodeproj) lives., default:ios], [name:--device [string], description:Explicitly set device to use by name. The value is not required if you have a single device connected.], [name:--udid , description:Explicitly set device to use by udid], [name:--no-packager, description:Do not launch packager while building], [name:--verbose, description:Do not use xcbeautify or xcpretty even if installed], [name:--port , default:8081], [name:--terminal , description:Launches the Metro Bundler in a new window using the specified terminal path.]]], [name:log-android, description:starts logkitty], [name:run-android, description:builds your app and starts it on a connected Android emulator or device, options:[[name:--root , description:[DEPRECATED - root is discovered automatically] Override the root directory for the android build (which contains the android directory), default:], [name:--variant , description:Specify your app's build variant, default:debug], [name:--appFolder , description:[DEPRECATED ?? use "project.android.appName" in react-native.config.js] Specify a different application folder name for the android source. If not, we assume is "app"], [name:--appId , description:Specify an applicationId to launch after build. If not specified,packagefrom AndroidManifest.xml will be used., default:], [name:--appIdSuffix , description:Specify an applicationIdSuffix to launch after build., default:], [name:--main-activity , description:Name of the activity to start, default:MainActivity], [name:--deviceId , description:builds your app and starts it on a specific device/simulator with the given device id (listed by running "adb devices" on the command line).], [name:--no-packager, description:Do not launch packager while building], [name:--port , default:8081], [name:--terminal , description:Launches the Metro Bundler in a new window using the specified terminal path.], [name:--tasks , description:Run custom Gradle tasks. By default it's "installDebug"], [name:--no-jetifier, description:Do not run "jetifier" ?? the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet. See more at: https://www.npmjs.com/package/jetifier.], [name:--active-arch-only, description:Build native libraries only for the current device architecture for debug builds., default:false]]]], assets:[], healthChecks:[], platforms:[ios:[:], android:[:]], project:[ios:[sourceDir:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\ios, folder:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022, pbxprojPath:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\ios\reactnativepersonalapp2022.xcodeproj\project.pbxproj, podfile:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\ios\Podfile, podspecPath:null, projectPath:C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\ios\reactnativepersonalapp2022.xcodeproj, projectName:reactnativepersonalapp2022.xcodeproj, libraryFolder:Libraries, sharedLibraries:[], plist:[], scriptPhases:[]], android:null]]
- 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.
- Get more help at https://help.gradle.org
BUILD FAILED in 30s
C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\android\gradlew.bat exited with non-zero code: 1
Error: C:\Visual Studio Code\Tutorial_React Native Master\reactnative_personal_app_2022\android\gradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\withe\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (node:events:642:26)
at ChildProcess.emit (node:events:527:28)
at ChildProcess.cp.emit (C:\Users\withe\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
at spawnAsync (C:\Users\withe\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\src\spawnAsync.ts:26:19)
at spawnGradleAsync (C:\Users\withe\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:83:18)
at assembleAsync (C:\Users\withe\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:57:16)
at actionAsync (C:\Users\withe\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:143:9)
- Ngôn ngữ chính
- JavaScript
- Star
- 13.2k
- Fork
- 1.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của expo/create-react-native-app
-
eas.json error on buildingĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
expo/create-react-native-app#947 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 10/100
expo/create-react-native-app#946 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
expo/create-react-native-app#945 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
expo/create-react-native-app#931 · 14 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
expo/create-react-native-app#929 ·
Tất cả issue của expo/create-react-native-app
Issue tương tự
-
bug data-types
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: tests help wanted size/s
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
DahanItamar/DockNest#368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100