flutter_lamp icon indicating copy to clipboard operation
flutter_lamp copied to clipboard

Example app won't build on Pixel 3.

Open speaking-in-code opened this issue 4 years ago • 0 comments

The example app does not build on Pixel 3 for me. I will look at sending a PR to fix the problem.

Flutter run output:

$ flutter run
Running "flutter pub get" in example...                             1.6s
Launching lib/main.dart on Pixel 3 in debug mode...
[!] Your app isn't using AndroidX.
    To avoid potential build failures, you can quickly migrate your app by
    following the steps on https://goo.gl/CP92wY .
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.    
        at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
        at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:558)
      ...
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* Where:                                                                
Script '/Users/brian/Applications/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 26
                                                                        
* What went wrong:                                                      
A problem occurred evaluating script.                                   
> Could not find method google() for arguments [] on repository container.
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        21.6s
Exception: Gradle task assembleDebug failed with exit code 1

Output of flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-US)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.5)
[✓] IntelliJ IDEA Community Edition (version 2017.2.2)
[✓] Connected device (1 available)

speaking-in-code avatar Sep 29 '20 03:09 speaking-in-code