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

FAILURE: Build failed with an exception. #23

Open
xSILENCEx opened this issue Apr 18, 2020 · 3 comments
Open

FAILURE: Build failed with an exception. #23

xSILENCEx opened this issue Apr 18, 2020 · 3 comments

Comments

@xSILENCEx
Copy link

xSILENCEx commented Apr 18, 2020

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!
@rayliverified
Copy link

I'm getting this error too.
Latest stable branch with Flutter Add-to-app.

@samandmoore
Copy link

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:

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.")
}

@clovisnicolas i'm happy to open a PR to address this issue. are you still maintaining this project?

@samandmoore
Copy link

it looks like a work-around is to pin your version to 0.0.4 before this change was added 3e9c4e3

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

3 participants