0

I have a problem that I can not solve. When compiling, throw the following

Launching lib\main.dart on Android SDK built for x86 in debug...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
Exit code 1 from:
C:\Users\userName\AndroidStudioProjects\flutter_app1\android\gradlew.bat
app:properties:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* Where:
Build file

'C:\Users\userName\AndroidStudioProjects\flutter_app1\android\app\build.gradle' line: 25

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all files for configuration 'classpath'.
> Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
Searched in the following
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar

* 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 0s

Finished with error: Please review your Gradle project setup in the android/ folder.

I tried to do what he says (I do not know if I did it right), but I did not solve.

How can I solve?

Thanks,

Daniel

DomDunk
  • 837
  • 6
  • 11
  • What does running `./gradlew build --info` in the terminal (in android studio) say? – chornge Oct 26 '18 at 14:49
  • 1
    Possible duplicate of [couldn't locate lint-gradle-api-26.1.2.jar for flutter project](https://stackoverflow.com/questions/52945041/couldnt-locate-lint-gradle-api-26-1-2-jar-for-flutter-project) – chornge Oct 26 '18 at 14:51
  • "." no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable. Sorry for the spanish... – DomDunk Oct 26 '18 at 15:04
  • take a look [here](https://stackoverflow.com/a/42468842/1008011): run `chmod 777 gradlew` before running `./gradlew build --info`. – chornge Oct 26 '18 at 15:08
  • No sir, I write in Android Studio Terminal this code, but it doesn't work. It say the same "it is not recognized as an internal or external command" – DomDunk Oct 26 '18 at 15:14
  • Have you taken a look at the "possible duplicate" link above? Does it provide a solution to the issue in your question? – chornge Oct 26 '18 at 15:18
  • Yes, Thanks. I solved gradle's problem with this link. Thanks. Now I have a problem with emulator.. It crashes... I'm unistalling android studio and I will install... – DomDunk Oct 26 '18 at 15:34
  • THANKS. I solved with this link and unistalling and installing again Android Studio. – DomDunk Oct 26 '18 at 16:23

1 Answers1

0

It is a problem in the current flutter version. It has already been reported to flutter, it should be fixed in the next release.

This is the workaround that I answered in another post.

Json
  • 1,655
  • 1
  • 13
  • 21