flutter_screen
flutter_screen copied to clipboard
FAILURE: Build failed with an exception.
When I run flutter build apk
get the following information:
* Where:
Build file 'C:\Users\SILENCE\flutter\.pub-cache\hosted\pub.flutter-io.cn\screen-0.0.5\android\build.gradle' line: 11
* What went wrong:
A problem occurred evaluating root project 'screen'.
> Flutter SDK not found. Define location with flutter.sdk in the local.properties file.
* 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 2s
The plugin screen could not be built due to the issue above.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.778], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.44.2)
[√] Connected device (1 available)
• No issues found!
I'm getting this error too. Latest stable branch with Flutter Add-to-app.
yep. it appears that this is because of these lines in the build.gradle of this project.
i think these are unnecessary and should be removed:
https://github.com/clovisnicolas/flutter_screen/blob/3e9c4e3cc5281d5ea6804f468e55793deb7d1b08/android/build.gradle#L9-L12
@clovisnicolas i'm happy to open a PR to address this issue. are you still maintaining this project?
it looks like a work-around is to pin your version to 0.0.4 before this change was added https://github.com/clovisnicolas/flutter_screen/commit/3e9c4e3cc5281d5ea6804f468e55793deb7d1b08