firebase auth - duplicate class: io.flutter.plugins.GeneratedPluginRegistrant

Viewed 599

Build fails with error: duplicate class: io.flutter.plugins.GeneratedPluginRegistrant

Build was successful when run 1 hr ago

Have tried cleaning project, deleting gradle caches.

Can supply stack trace / further info if requested.

    /home/nigel/flutter-projects/flutterfire/packages/firebase_auth/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:12: error: duplicate class: io.flutter.plugins.GeneratedPluginRegistrant
public final class GeneratedPluginRegistrant {                          
             ^                                                          
1 error                                                                 
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileDebugJavaWithJavac'.             
> Compilation failed; see the compiler error output for details. 
1 Answers

Navigate to /android/app/src/main/java

if there are two folders

delete one of them and run your application

if the error comes again, then delete the other folder instead of the first one.


in your case navigate /android/app/src/main/java/ and delete io folder and run your application

It will work... (If God Will)

Related