-2

First sorry for bad English. I'm starting in Flutter, I already installed everything that is necessary but when trying to run the test app (either in the emulator or the device) I get the error messages below.


Launching lib\main.dart on XT1097 in debug mode... Initializing gradle... Resolving dependencies... * Error running Gradle: Exit code 1 from: C:\Testes\first_app\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.

BUILD FAILED in 3s

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

**************This is the result of my flutter Doctor**************************

[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [versão 10.0.17134.345], locale pt-BR) • Flutter version 0.9.4 at C:\Src\flutter • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400 • Engine revision 74625aed32 • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[!] Android toolchain - develop for Android devices (Android SDK 28.0.2) • Android SDK at C:\Users\AKC\AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.2 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) X Android license status unknown.

[√] Android Studio (version 3.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 29.0.1 • Dart plugin version 173.4700 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] VS Code, 64-bit edition (version 1.27.2) • VS Code at C:\Program Files\Microsoft VS Code • Flutter extension version 2.19.0

[√] Connected devices (1 available) • XT1097 • 0011102704 • android-arm • Android 6.0 (API 23)

! Doctor found issues in 1 category.


I've tried to resolve the android licenses running flutter doctor --android-licenses but the error has returned

Thanks, if anyone can help.

  • 2
    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) – M.Ricciuti Oct 29 '18 at 16:12
  • question already asked several times the past few days . see one of the multiple solutions here : https://stackoverflow.com/a/53003550/6899896 – M.Ricciuti Oct 29 '18 at 16:14

1 Answers1

2

Sorry, a lot of people is experiencing that both to new and old projects (including me).

It's already solved, but it's not yet in the beta channel (which is currently the most stable one).

I suggest you to temporarily switch to the master channel (most recent and least stable), later you can switch back to the beta channel.

As you're new to flutter, I must say that this is uncommon, it's the first time I see a serious problem like that take more than a week to get solved - and as you can see in the issue in the link, the root cause is NOT flutter itself.

list channels and see which one you're using

flutter channel

switch to master and upgrade

flutter channel master
flutter upgrade
Feu
  • 5,372
  • 1
  • 31
  • 57
  • Thank you for your help. I removed my flutter, and downloaded the master channel version. It worked! Thank you again! – Sheldon Pereira Barbosa Oct 30 '18 at 17:37
  • I think that's what you done, but just to be sure: you don't need to 'remove' your flutter. Flutter itself already switch between its respective git branches by using the flutter command line tool with the channel option. You're welcome, and good coding. – Feu Oct 30 '18 at 17:41