問題描述
所以,我對 build.gradle(app) 文件進行了一些更改,android studio 給了我這個錯誤(在新選項卡中打開圖像以便更好地查看):
So, I made some changes to my build.gradle(app) file and android studio gives me this error (open the image in new tab for better viewing):
我的 build.gradle(app) 文件(這不是編輯后的文件,我刪除了新的代碼行,但仍然沒有運氣/解決方案.):
My build.gradle(app) file (this is not the edited file, I deleted new lines of code and still no luck/solution.):
在我對 build.gradle(app) 文件進行一些更改之前,一切都運行良好,但后來我刪除了那些新的代碼行,android studio 仍然不斷給我錯誤.該錯誤與compile 'com.google.android.gms:play-services:8.3.0'有關.我曾嘗試刪除/重命名指定文件夾中的那些 png 圖像,但是當我重建項目時,會自動下載 png 圖像.我的 build.gradle(project) 文件包含 classpath 'com.android.tools.build:gradle:1.5.0'.我想知道是什么導致了這個錯誤,以及如何解決它?非常感謝.
Everything was quite working well until I made some changes in the build.gradle(app) file, but then I deleted those new lines of codes and android studio is still keep giving me the error. The error relates to the compile 'com.google.android.gms:play-services:8.3.0'. I have tried deleting/renaming those png images inside the stated folder,but then when I rebuild the project, the png images are automatically downloaded. My build.gradle(project) file contains classpath 'com.android.tools.build:gradle:1.5.0'. I want to know what causes this error, and how to fix it? Many thanks.
推薦答案
我剛剛遇到了同樣的問題.我不知道您的確切問題的解決方法,但我找到了解決方法;我看到你的項目有一個很深的文件路徑層次結構.為什么不把你的項目從較低的層次上移呢?
I just ran into the same issue. I don't know a fix for your exact problem, but I found a work around; I see your project has a deep file path hierarchy. Why not just move your project up from a lower level?
例如:C:ProjectsYourProject
這解決了我的問題.
這篇關于錯誤:Windows 上的文件路徑太長,請保持在 240 個字符以下的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!