This error, affects those who have their Android Studio and their Project Files in a different folder from the C: Drive, and when you open the Android Module as a separate Android Studio window.

I used to have to either work on the project in C: Drive, or copy the project from my other drive into C: Drive, whenever I wanted to open the Android Module.

Thankfully, I now have a quick tip on how to work around the error, while still in my normal project drive.

For this, I'm using the following current versions:

  • Android Studio: Android Studio Iguana | 2023.2.1 Patch 2 (April 2024)
  • Flutter: 3.19.6 • channel stable (April 2024)

First, just open the Android Module in Android Studio as you normally would.

If you run into problem opening the Android Module in Android Studio through your Flutter project, you can view this tutorial on how to get around it:

Once you've let the Gradle build finish running, you may have this error - "... this and base files have different roots:...".

This is the error I will provide a tip, on how to get around.

Just go into the Terminal, type "Flutter Clean" and Run this command.

Once that's completed, go into File, and click on "Sync Project with Gradle Files", and let the Gradle Build process run.

This time, the Gradle build completes successfully, without the error.

Don't forget to go back into the terminal, and now run the command "Flutter Pub Get"

~ END ~

Categories: Uncategorized


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *