0

I have this problem when I compile my Flutter project. I cloned a project that I need to work on. After cloning the project, I installed the dependencies and then I started compiling the project and I got the error.

FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':gradle:jar'. > Entry FlutterPlugin.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.4/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details. * 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 1m 53s Running Gradle task 'assembleDebug'... 115,6s Error: Gradle task assembleDebug failed with exit code 1 

I tried:

flutter clean cd android ./gradlew clean cd .. rm -rf android/.gradle rm -rf android/app/build flutter pub get 

then i tried this in the build.gradle which is in android

android { packaging { resources { pickFirsts += ['**/FlutterPlugin.class', '**/libc++_shared.so', '**/libjsc.so'] excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt'] } } } 
0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.