Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not create task ... this and base files have different roots

I've built an app with Android Studio and Flutter and wanted to generate a signed APK. When I go to Tools->Flutter->Open Android module in Android Studio, it starts to build the project.

But after some time I get this Error and I don't know how to change the roots or what to do. It seems like the problem are just two packages (url_launcher and shared preferences)

My Project is on my hard disk F: and the flutter folder is on my hard disk C:

Error Message "Could not create task..."

Is this maybe because my project is on F: and the flutter folder with the packages in C: ? How can I change the flutter folder to F: ?

like image 779
knobi Avatar asked Sep 11 '25 01:09

knobi


1 Answers

As a workaround, you can do the following steps -

  1. run flutter clean
  2. do the Gradle sync without flutter pub get and make necessary changes to native android code.
  3. do pub get and run the app.
like image 130
ANAS AJI MUHAMMED Avatar answered Sep 13 '25 00:09

ANAS AJI MUHAMMED