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
1 Answer
Reset to default 0i 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.
本文标签:
版权声明:本文标题:android - Error: Could not create task ':path_provider_android:compileDebugUnitTestSources' in Flutter project - 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741778485a2397167.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论