Hello
When I download the repository and run it in VsCode as a normal flutter project, this error has occurred :
Exception: [!] Your app is using an unsupported Gradle project. To fix this problem, create a new project by running flutter create -t app <app-directory> and then move the dart code, assets and pubspec.yaml to the new project.
and when add the following code in build.gradle :
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
this error has occurred :
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 106
* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [class 'FlutterPlugin']
> Cannot add task 'generateLockfiles' as a task with that name already exists.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle
Hello
When I download the repository and run it in VsCode as a normal flutter project, this error has occurred :
Exception: [!] Your app is using an unsupported Gradle project. To fix this problem, create a new project by running
flutter create -t app <app-directory>and then move the dart code, assets and pubspec.yaml to the new project.and when add the following code in build.gradle :
this error has occurred :