对于大学课程,我需要使用 Google Drive 文件夹作为我的项目位置。问题是 Google Drive 使我隐藏了 OS XIcon files https://superuser.com/questions/298785/icon-file-on-os-x-desktop出现。
当我尝试在 Android Studio 中运行应用程序并构建它时,Icon
文件打开,我收到以下消息:
Files under the build folder are generated and should not be edited.
Error: The file name must end in .xml.
My res/layout
文件夹包含一个Icon
文件,(显然)不以.xml
。我删除了该文件,但仍然遇到同样的错误。
有没有办法解决这个问题,在 Mac 上的 Google Drive 文件夹中构建我的应用程序,或者这是不可能的?
以下是上下文中的错误:
/Users/meda/GoogleDrive/Gloriane-CS115/AndroidStudioProjects/MyFirstApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res/drawable/Icon
Error:Error: The file name must end with .xml
:app:preBuild UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:prepareDebugDependencies
:app:generateDebugBuildConfig UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
Error:Error: The file name must end with .xml
:app:generateDebugResources UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
Error:Error: The file name must end with .xml
/Users/meda/GoogleDrive/Gloriane-CS115/AndroidStudioProjects/MyFirstApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res/color-v23/Icon
Error:Error: The file name must end with .xml or .png
/Users/meda/GoogleDrive/Gloriane-CS115/AndroidStudioProjects/MyFirstApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res/drawable-hdpi-v4/Icon
Error:Error: The file name must end with .xml or .png
/Users/meda/GoogleDrive/Gloriane-CS115/AndroidStudioProjects/MyFirstApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res/drawable-ldrtl-hdpi-v17/Icon
Error:Error: The file name must end with .xml or .png
/Users/meda/GoogleDrive/Gloriane-CS115/AndroidStudioProjects/MyFirstApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res/drawable-ldrtl-mdpi-v17/Icon
Error:Error: The file name must end with .xml or .png
这些是我们根据 Hod 的回答开发的解决方案。
摆脱当前的所有Icon
files
- 在项目的父文件夹中打开一个终端窗口。
- 要查找图标文件,请执行:
find . -name Icon\*
- 如果得到任何结果,请执行:
find . -name Icon\* -delete
自动删除未来Icon
files
- 在项目的父文件夹中打开一个终端窗口。
- 复制并粘贴此咒语((改编自https://stackoverflow.com/a/9625233/631051 https://stackoverflow.com/a/9625233/631051),这将删除
Icon
每分钟文件:(crontab -l 2>/dev/null; echo "*/1 * * * * find . -name Icon\* -delete") | crontab -
要撤消,请输入以下咒语(改编自https://askubuntu.com/a/719877/43296 https://askubuntu.com/a/719877/43296)在终端窗口(在任何文件夹中):crontab -l | grep -v Icon | crontab -
假设
所有这一切都假设您拥有:
- 没有名称开头的文件
Icon
在您想要保留的项目层次结构中。
- 没有涉及 cron 作业
Icon
你想保留的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)