You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { stream ->
localProperties.load(stream)
}
}
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.")
}
`
Properties() and GradleException (...) say can't resolve when compiling.
What went wrong:
A problem occurred evaluating project ':app'.
ASCII
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.
Hello,
Your app seems to be very good. It still works perfectly when downloaded from Google Play. You did an amazing job.
But when I try to launch it from Android Studio I have several problems:
-> SOLVED :
In file android/app/build.gradle, line 1 and line 11(https://github.com/MSzalek-Mobile/weight_tracker/blob/master/android/app/build.gradle) :
`
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { stream ->
localProperties.load(stream)
}
}
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.")
}
`
Properties() and GradleException (...) say can't resolve when compiling.
I found the solution following this topic: flutter/flutter#29608 .
-> NOT SOLVED YET:
Then, when trying to compile again Ihave this error message :
_FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\33695\AndroidStudioProjects\weight_tracker-master\android\app\build.gradle' line: 23
What went wrong:
A problem occurred evaluating project ':app'.
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 16s
Exception: Gradle task assembleDebug failed with exit code 1_
I tried the solutions from this topic : https://github.com/flutter/flutter/issues/41492
So I tried to change android/build.gradle (https://github.com/MSzalek-Mobile/weight_tracker/blob/master/android/build.gradle) and (android/gradle/wrapper/gradle-wrapper.properties https://github.com/MSzalek-Mobile/weight_tracker/blob/master/android/gradle/wrapper/gradle-wrapper.properties ) in order to update Gradle.
It didn't work :( .
I also tried to use gradle zip in local instead of downloading (https://stackoverflow.com/questions/22896569/how-to-use-gradle-zip-in-local-system-without-downloading-when-using-gradle-wrap) ... it didn't work :( .
I don't know where I made a mistake. I'm a beginner so I must have missed something obvious.
Can you please help me ?
Thanks a lot.
The text was updated successfully, but these errors were encountered: