简体   繁体   中英

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. I found some videos showing you how to set up Flutter with Android Studio. 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. 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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM