I understand the issue you're facing, and there are several potential solutions you can try to resolve it.
Run flutter clean in your terminal to clean the build artifacts and start with a fresh build.
If the problem persists, consider making a fresh copy of your Android folder, as this can sometimes resolve persistent issues.
However, if the error still persists after trying the above steps, it's possible that the hang-up is related to the initialization of external services like Firebase, AWS, or other APIs. Specifically, if you have used an await statement during the initialization process, it might lead to a long wait during profile initialization.
To address this, locate the main function in your code, and if you find an await statement for initializing Firebase or any other cloud resources, remove it. The proper way to set up SDKs for cloud resources is through their respective initialization methods without using await during app initialization
For example, instead of this:
await Firebase.initializeApp(); // REMOVE THIS LINE
Do This
void main() {
WidgetsFlutterBinding.ensureInitialized();
Firebase.initializeApp(); // Proper initialization without await
runApp(const MyApp());
}