Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need version upgrade - Gradle build #39

Open
davidmatoska opened this issue Aug 6, 2020 · 0 comments
Open

Need version upgrade - Gradle build #39

davidmatoska opened this issue Aug 6, 2020 · 0 comments

Comments

@davidmatoska
Copy link

davidmatoska commented Aug 6, 2020

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'.

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.

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant