我有一個使用“npx react-native init LatinApp”命令使用 React Native CLI 構建的新應用程式,并且沒有在任何檔案中編輯任何內容。當我在 cmd 中運行“npx react-native run-android”命令時,它會在另一個 cmd 中打開 Metro,但會引發以下錯誤。(我以管理員權限運行我的 cmd 并且 android 檔案夾中的所有檔案都啟用了完全訪問權限)
C:\Users\eminn\Desktop\projects\LatinApp>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 870 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
> Task :app:processDebugMainManifest FAILED
Error 'C:\Users\eminn\Desktop\projects\LatinApp\android\app\build\outputs\logs\manifest-merger-debug-report.txt (Access is denied)' while writing the merger report file, build can continue but merging activities will not be documented
11 actionable tasks: 4 executed, 7 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> java.io.FileNotFoundException: C:\Users\eminn\Desktop\projects\LatinApp\android\app\build\intermediates\manifest_merge_blame_file\debug\manifest-merger-blame-debug-report.txt (Access is denied)
* 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 22s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> java.io.FileNotFoundException: C:\Users\eminn\Desktop\projects\LatinApp\android\app\build\intermediates\manifest_merge_blame_file\debug\manifest-merger-blame-debug-report.txt (Access is denied)
* 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 22s
at makeError (C:\Users\eminn\Desktop\projects\LatinApp\node_modules\execa\index.js:174:9)
at C:\Users\eminn\Desktop\projects\LatinApp\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (C:\Users\eminn\Desktop\projects\LatinApp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\eminn\Desktop\projects\LatinApp\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
uj5u.com熱心網友回復:
問題出在 AVG Antivirus,它出于某種原因將“manifest-merger-blame-debug-report.txt”標記為木馬。禁用它,構建成功完成。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/367234.html
上一篇:自定義戰爭中的清單任務
