The error message "No variants found for ‘:app’" usually occurs when Android Studio is unable to find any build variants for the app module in your project.\n\nHere are a few possible solutions to fix this issue:\n\n1. Sync Gradle Files: Click on the "Sync Project with Gradle Files" button in the toolbar of Android Studio. This will sync your project's Gradle files and update the build variants.\n\n2. Check build.gradle Files: Make sure that the build.gradle file for your app module is properly configured. It should include the necessary dependencies, build types, and flavors. Also, check if there are any errors or warnings in the file.\n\n3. Clean and Rebuild Project: Go to the "Build" menu in Android Studio and select "Clean Project" followed by "Rebuild Project". This will clean and rebuild your project, resolving any potential build issues.\n\n4. Invalidate Caches and Restart: Go to the "File" menu in Android Studio and select "Invalidate Caches / Restart". This will clear the cache and restart Android Studio, which can sometimes solve build variant issues.\n\n5. Update Android Studio and Gradle: Ensure that you are using the latest version of Android Studio and Gradle. You can check for updates in the "Help" menu of Android Studio. Updating to the latest versions can sometimes resolve compatibility issues.\n\nIf none of the above solutions work, it might be helpful to provide more details about your project setup and any specific changes you made before encountering this error.

Android Studio Error: "No variants found for ':app'" - Solution Guide