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

flutter run fails in incomprehensible ways when run on packages created with very old flutters #16441

Closed
Hixie opened this issue Apr 10, 2018 · 7 comments
Labels
t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@Hixie
Copy link
Contributor

Hixie commented Apr 10, 2018

flutter run failed with the following completely useless message:

* Error running Gradle:
Exit code 1 from: /Users/ianh/dev/dummy/android/gradlew app:properties:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/ianh/dev/dummy/android/build.gradle' line: 20

* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
   > Failed to notify project evaluation listener.
      > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s

Please review your Gradle project setup in the android/ folder.
@Hixie Hixie added the t: gradle "flutter build" and "flutter run" on Android label Apr 10, 2018
@Hixie
Copy link
Contributor Author

Hixie commented Apr 10, 2018

This was with a package create with an old version of Flutter. When I tried flutter create to create an up to date package, I got told to run flutter doctor --android-licenses. Dunno if that's related.

@Hixie
Copy link
Contributor Author

Hixie commented Apr 10, 2018

...then that told me to run /Users/ianh/Library/Android/sdk/tools/bin/sdkmanager --update.

@Hixie
Copy link
Contributor Author

Hixie commented Apr 10, 2018

(The original package was so old that it didn't have a .metadata file.)

@Hixie Hixie changed the title Gradle errors are terrible flutter run fails in incomprehensible ways when run on packages created with very old flutters Apr 10, 2018
@Hixie Hixie added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 23, 2018
@Hixie Hixie added this to the Goals milestone May 30, 2018
@hungrymonkey
Copy link

hungrymonkey commented Feb 1, 2019

Hi Hixie,

I want to document a workaround.

As mentioned here, support for higher Android version was migrated to fix this issue
#16215

As mvran-google has mentioned, it is possible to open android/ in android-studio and fix build errors one by one until everything is fixed
#16215 (comment)

I want to document one more thing with platform channels.
I seem like the behavior is changed on OnMethodCall. The workaround is to add returns statements after success as mentioned by zoechi
#27014 (comment)

I hit this issue badly trying to update my plugin
https://github.com/hungrymonkey/mic_stream/tree/issue_2

@zoechi
Copy link
Contributor

zoechi commented Feb 12, 2019

Related #14974, #12573, #12983, #9827

@jmagman jmagman added this to Awaiting triage in Tools - Gradle review Jan 10, 2020
@eseidelGoogle
Copy link
Contributor

I'm not sure we should worry too much about ancient Flutter packages. We could probably improve our error handling in the tool, but my gut tells me we should just close this?

Is there something still you'd like done here @Hixie? Otherwise speculatively closing. Thanks!

Tools - Gradle review automation moved this from Awaiting triage to Engineer reviewed Jan 10, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - Gradle review
  
Engineer reviewed
Development

No branches or pull requests

4 participants