googlecodelabs / photos-sharing

Code for the "Build a Photo Sharing app with Google Photos and Flutter" codelab
Apache License 2.0
98 stars 76 forks source link

Execution failed for task ':app:preDebugBuild'. #3

Closed hossameldinmi closed 5 years ago

hossameldinmi commented 5 years ago

FAILURE: Build failed with an exception.

BUILD FAILED in 11s


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.


Gradle task assembleDebug failed with exit code 1

llleodeleon commented 5 years ago

I have the same issue @cassierecher @jfschmakeit

davidglivar commented 5 years ago

https://github.com/flutter/flutter/issues/27254#issuecomment-468526704

upgrading gradle resolved this for me

hossameldinmi commented 5 years ago

I got the solution It's related to Android X Compatibility, read this article Migrating to Android X for Migrating to Android X and this that solves the problem.

jfschmakeit commented 5 years ago

Just fixed this in cc6e09a - thanks for the pointer!

panicoli0 commented 4 years ago

Only need to add the following code on the build.gradle file:

configurations.all {
    resolutionStrategy {
        force 'androidx.media:media:1.0.0'
    }
}

Then, the app runs without any error.