Flutter build appbundle R8: Type com.bundle.id.MainActivity is defined multiple times:

Viewed 390

When I run

flutter build appbundle

it returns with the following error

./build/app/intermediates/javac/release/classes/com/bundle/id/MainActivity.class:

R8: Type com.bundle.id.MainActivity is defined multiple times:

./build/app/intermediates/javac/release/classes/com/bundle/id/MainActivity.class,

./build/app/tmp/kotlin-classes/release/com/bundle/id/MainActivity.class FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:minifyReleaseWithR8'.

com.android.tools.r8.CompilationFailedException: Compilation failed to complete

Where com.bundle.id is my app bundle

It says there are duplicate files called MainActivity. How should I fix this?

0 Answers
Related