简体   繁体   English

在 Android Studio 中运行 Flutter 应用程序时出错:任务 ':app:generateDebugBuildConfig' 执行失败

[英]ERROR When Running Flutter App in Android Studio: Execution failed for task ':app:generateDebugBuildConfig'

Im new to mobile app development but I wanted to build a very simple app.我是移动应用程序开发的新手,但我想构建一个非常简单的应用程序。 I was searching online and found Flutter to be the most appealing option.我在网上搜索,发现 Flutter 是最吸引人的选择。 I found some videos showing you how to set up Flutter with Android Studio.我找到了一些视频,向您展示如何使用 Android Studio 设置 Flutter。 I followed the video and everything was going great until I ran into a problem when trying to run the Flutter template on an emulator.我跟着视频,一切都很好,直到我在模拟器上运行 Flutter 模板时遇到问题。 I got this error:我收到了这个错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> java.nio.file.AccessDeniedException: C:\Users\ivomu\Desktop\New folder\PROGRAMIRANJE\Flutter Apps\WeightAppp\build\app\generated\source\buildConfig\debug\com\example\WeightAppp

* 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 3s
Exception: Gradle task assembleDebug failed with exit code 1

I looked online and found no one else with such proble.我在网上查了一下,没有其他人有这样的问题。 How do I fix this?我该如何解决?

java.nio.file.AccessDeniedException

Flutter probably doesn't have permission to access the specific file(s). Flutter 可能没有访问特定文件的权限。

If you are using the command prompt, try running it with admin privileges.如果您使用的是命令提示符,请尝试以管理员权限运行它。 If you are using Android Studio, try opening Android Studio as an admin.如果您使用的是 Android Studio,请尝试以管理员身份打开 Android Studio。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 任务 ':app:generateDebugBuildConfig' Flutter 执行失败 - Execution failed for task ':app:generateDebugBuildConfig' Flutter 任务“:app:generateDebugBuildConfig”执行失败。 扑腾 - Execution failed for task ':app:generateDebugBuildConfig'. in flutter 错误:任务 'app:generateDebugBuildConfig' 执行失败 - Error:Execution failed for task 'app:generateDebugBuildConfig' Flutter 错误:任务“:app:generateDebugBuildConfig”执行失败。 (/android/app/src/main/AndroidManifest.xml 中的问题) - Flutter error : Execution failed for task ':app:generateDebugBuildConfig'. (problem in /android/app/src/main/AndroidManifest.xml ) 任务 ':app:generateDebugBuildConfig 执行失败 - Execution failed for task ':app:generateDebugBuildConfig 在Android Studio中运行应用程序时执行失败 - Execution failed when running app in Android Studio Flutter on Android Studio 执行任务“:app:checkDebugDuplicateClasses”失败 - Flutter on Android Studio Execution failed for task ':app:checkDebugDuplicateClasses' 我的Android应用程序已成功同步,但是在运行该应用程序时,错误提示“'app:mergeDebugResources”执行失败 - My Android app is getting synced successfully but when running the app then giving error Execution failed for task ':app:mergeDebugResources' flutter 和 android gradle 错误:任务 ':app:checkDebugDuplicateClasses' 执行失败 - error with flutter and android gradle :Execution failed for task ':app:checkDebugDuplicateClasses' 错误:任务':app:zipalignDebug'的执行失败。 >当我在Android Studio上运行我的应用程序时 - Error:Execution failed for task ':app:zipalignDebug'. > when I run my app on Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM