0

I can't run my first flutter app in Android Studio

Flutter Doctor -v

[√] Flutter (Channel beta, v0enter code here.9.4, on Microsoft Windows [Version 10.0.17134.345], locale en-US)enter code here
• Flutter version 0.9.4 at C:\development\flutter`enter code here`
• Framework revision f37c235 (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 27.0.3)
• Android SDK at C:\Users\Meteor\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = C:\Users\Meteor\AppData\Local\Android
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[√] Android Studio (version 3.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 29.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

• No issues found!

Android Studio (Console)

Performing hot restart...
Syncing files to device Android SDK built for x86...

Error running Gradle:
Exit code 1 from: C:\Users\Meteor\AndroidStudioProjects\my_flutter_app\android\gradlew.bat app:properties:
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Download /dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom
Download /dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.pom
Download /dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.pom

Download /com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download /com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
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\Meteor\AndroidStudioProjects\my_flutter_app\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 locations:
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 7m 57s

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

2 Answers 2

1
Download /dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.pom

This suggests that you are using an old version of Gradle. Try upgrading to 3.2.0.

Sign up to request clarification or add additional context in comments.

Comments

1

Try open the android dir in Android Studio as a Android Project,then open the \app\build.gradle and click sync button.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.