admin管理员组

文章数量:1304893

I'm encountering an error when building my Flutter project, and I have been unable to resolve it after trying various solutions. Here is the error message I am getting:

The supplied phased action failed with an exception.

Could not create task ':path_provider_android:compileDebugUnitTestSources'.
this and base files have different roots: D:\\Sem-8\\Projects\\chat\\build\\path_provider_android and C:\\Users\\haris\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.15\\android.

Context:
Flutter Version: (e.g., Flutter 3.0.5)
Android Studio Version: (e.g., 2021.3)
Operating System: Windows 10
Path Provider Version: 2.2.15

Cleaned the project: I tried running flutter clean and rebuilding the project, but the error persists.

Checked the file paths: The error seems to indicate a conflict between two different file paths:

D:\\Sem-8\\Projects\\chat\\build\\path_provider_android
C:\\Users\\haris\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.15\\android

I'm unsure why these paths are conflicting since the project should be using the path_provider_android package from the pub.dev cache.

Reinstalled dependencies: I ran flutter pub get to ensure all dependencies are up to date.

Checked for multiple installations: I checked if there were any issues with multiple installations of path_provider_android or conflicting versions, but couldn't find any clear issues.

Any suggestions or solutions would be greatly appreciated.

I'm encountering an error when building my Flutter project, and I have been unable to resolve it after trying various solutions. Here is the error message I am getting:

The supplied phased action failed with an exception.

Could not create task ':path_provider_android:compileDebugUnitTestSources'.
this and base files have different roots: D:\\Sem-8\\Projects\\chat\\build\\path_provider_android and C:\\Users\\haris\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.15\\android.

Context:
Flutter Version: (e.g., Flutter 3.0.5)
Android Studio Version: (e.g., 2021.3)
Operating System: Windows 10
Path Provider Version: 2.2.15

Cleaned the project: I tried running flutter clean and rebuilding the project, but the error persists.

Checked the file paths: The error seems to indicate a conflict between two different file paths:

D:\\Sem-8\\Projects\\chat\\build\\path_provider_android
C:\\Users\\haris\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.15\\android

I'm unsure why these paths are conflicting since the project should be using the path_provider_android package from the pub.dev cache.

Reinstalled dependencies: I ran flutter pub get to ensure all dependencies are up to date.

Checked for multiple installations: I checked if there were any issues with multiple installations of path_provider_android or conflicting versions, but couldn't find any clear issues.

Any suggestions or solutions would be greatly appreciated.

Share Improve this question edited Feb 4 at 9:13 tyg 16.2k4 gold badges36 silver badges48 bronze badges asked Feb 4 at 8:56 Harish SondagarHarish Sondagar 211 bronze badge 2
  • Have you searched for other solutions online? For instance, this question/answer seems to be what you're looking for: stackoverflow/questions/69663243/… If not, please add what is different from your case. – Sousa Gaspar Commented Feb 4 at 9:31
  • Yes, i referred that. but that wasn't helpful to solve my error. – Harish Sondagar Commented Feb 5 at 10:16
Add a comment  | 

1 Answer 1

Reset to default 0

i got the way to solve this issue.

The issue was due to this the extension "Language Support for Java(TM) by Red Hat".

Once you Disable it the issue will be resolved.

本文标签: