I have the error I put in the title and below. The error occurs when you open Android Studio on folder /android. My project is a Flutter project. I created my project with the Android app Max 2D Game on my Samsung Galaxy A10.
Gradle sync failed: Cause: assert pluginDirectory.exists()
| |
| false >
\root\snap\flutter\common\flutter\.pub-cache\hosted\pub.dartlang.org\audioplayers-0.15.1\android
I invite you to explore my project on Gitpod or fork on GitHub and submit a pull request fixing this error.
Opening android studio in the android/app folder I get the following error:
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\Administrator\Downloads\flutter_windows_2.2.0-stable\flutter\packages\flutter_tools\gradle\app_plugin_loader.gradle' line: 27
* What went wrong:
A problem occurred evaluating script.
> assert pluginDirectory.exists()
| |
| false
\root\snap\flutter\common\flutter\.pub-cache\hosted\pub.dartlang.org\audioplayers-0.15.1\android
* 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 121ms