0

I am following a youtube tutorial on how to recreate zoom with flutter and firebase. I followed along for a bit and now decided to download the source code to see if it will run. And it didn't. Here is what I got when I tried to "flutter run" the app after running "flutter pub get":


FAILURE: Build failed with an exception.

* Where:
Build file '/home/oliveren/Downloads/flutter-zoom-clone-master/android/app/build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.version-check'.
   > Minimum supported Gradle version is 7.0.2. Current version is 6.7. If using the gradle wrapper, try editing the distributionUrl in /home/oliveren/Downloads/flutter-zoom-clone-master/android/gradle/wrapper/gradle-wrapper.properties to gradle-7.0.2-all.zip

* 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 792ms
Running Gradle task 'assembleDebug'...                           1,395ms
Exception: Gradle task assembleDebug failed with exit code 1

I saw that I need to update my Gradle so I did by replacing some lines in my android gradle files by following this post Update Gradle in Flutter project

now I am getting this:

 FAILURE: Build failed with an exception.

* Where:
Build file '/home/oliveren/Downloads/flutter-zoom-clone-master/android/app/build.gradle' line: 61

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method useProguard() for arguments [true] on BuildType$AgpDecorated_Decorated{name=release, debuggable=false, testCoverageEnabled=false, jniDebuggable=false, pseudoLocalesEnabled=false, renderscriptDebuggable=false, renderscriptOptimLevel=3, minifyEnabled=true, zipAlignEnabled=true, signingConfig=SigningConfig$AgpDecorated_Decorated{name=debug, storeFile=/home/oliveren/.android/debug.keystore, storePassword=android, keyAlias=AndroidDebugKey, keyPassword=android, storeType=pkcs12, v1SigningEnabled=true, v2SigningEnabled=true, enableV1Signing=null, enableV2Signing=null, enableV3Signing=null, enableV4Signing=null}, embedMicroApp=true, mBuildConfigFields={}, mResValues={}, mProguardFiles=[/home/oliveren/Downloads/flutter-zoom-clone-master/build/app/intermediates/default_proguard_files/global/proguard-android.txt-7.2.0, /home/oliveren/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter_proguard_rules.pro, /home/oliveren/Downloads/flutter-zoom-clone-master/android/app/proguard-rules.pro], mConsumerProguardFiles=[], mManifestPlaceholders={}} of type com.android.build.gradle.internal.dsl.BuildType$AgpDecorated.

* 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 859ms
Running Gradle task 'assembleDebug'...                           1,489ms
Exception: Gradle task assembleDebug failed with exit code 1

I saw some posts about how the 'useProguard' option has been removed in Gradle 7.0.0. Flutter should obfuscate without it, but I can add another option shrinkResources true etc. I tried this but maybe implemented it wrong and still is encountering the same error (or similar error). I am stuck at this point and neither stack overflow nor github has anything about this. Does anyone know what's going on?

olive ren
  • 13
  • 3

0 Answers0