4

My Flutter project failed to build today with the following error:

Where: Build file 'D:\Dev\Flutter\Projects\Misc\flutter_app\android\app\build.gradle' line: 26

What went wrong: A problem occurred evaluating project ':app'.

Could not resolve all artifacts for configuration 'classpath'. Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar

I also started a brand new Flutter project in Android Studio, without changing anything, and got the same error.

I am running Android Studio 3.2.1 (9 October) build on Windows 10 64-bit.

This is my Flutter doctor output:

> D:\Dev\Flutter\Flutter\bin\flutter.bat --no-color doctor Doctor
> summary (to see all details, run flutter doctor -v): [√] Flutter
> (Channel master, v0.10.2-pre.30, on Microsoft Windows [Version
> 10.0.17134.345], locale en-AU) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio
>     X Flutter plugin not installed; this adds Flutter specific functionality.
>     X Dart plugin not installed; this adds Dart specific functionality. [√] Connected device (1 available)
> 
> • No issues found! Process finished with exit code 0

(Ignore the Flutter and Dart plugin-not-installed warnings, they are always there for me although everything works)

I have tried other suggestions such as making sure the google() repository is on top of the Gradle build files, but no luck.

3

1 Answer 1

4

Missing google() in file: flutter/packages/flutter_tools/gradle/flutter.gradle#L21

Should be resolved after merge https://github.com/flutter/flutter/pull/23397

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

1 Comment

Thanks! This worked. How did you even figure that out :-)

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.