i'm using windows 10 Visual Studio Code and i'm trying to run my code after writing them and this is what it shows me afterwards.
Launching lib\main.dart on TECNO Camon CX in debug mode... * Error running Gradle: ProcessException: Process "C:\Users\IB\Desktop\Android\myapp\berry_networks\Dart test\Flutter App\first_flutter_app\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
Where: Build file 'C:\Users\IB\Desktop\Android\myapp\berry_networks\Dart test\Flutter App\first_flutter_app\android\app\build.gradle' line: 24
What went wrong: A problem occurred evaluating project ':app'.
Failed to apply plugin [id 'com.android.application'] Illegal char <<> at index 9: C:/users//.android\analytics.settings
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 7s Command: C:\Users\IB\Desktop\Android\myapp\berry_networks\Dart test\Flutter App\first_flutter_app\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder. Exited (sigterm)
how do i fix this?
@iRuth
This is my app/build.gradle on Visual Studio Code
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.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application' (This is line 24)
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.kkkkkkkk"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
androidfolder separately in Visual Studio code or Android Studio? What's the content of yourapp/build.gradlefile? It's complaining about line 24.app/build.gradlesays in line 24Refactormenu, selectMigrate to AndroidX....