如何解决自动忽略以“_”开头的文件/文件夹的问题(下划线)在资产文件夹中
我想在 eclipse 提供的 Android 模拟器上部署 PhoneGap 应用程序。我决定使用 Dojo Toolkit,它严重依赖于“ _ ”约定(以“ _ ”开头的文件/文件夹意味着这是一个私有/内部模块)。
基本上问题是,在部署应用程序时,每个以“_”开头的文件/文件夹都被省略。这完全把事情搞砸了,Dojo toolkit 正如预期的那样无法工作。
有办法解决这个问题吗?
I want to deploy PhoneGap app on the Android simulator provided with eclipse. I decided to use Dojo Toolkit which heavily relies on the " _ " convention (starting a file/folder with " _ " means this is a private/internal module).
Basically the problem is that while deploying the app, every file/folder starting with "_" is omitted. This completely messes things up, Dojo toolkit as exptected fails to work.
Is there a way to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在 android 应用程序的 android 块内的应用程序 build.gradle 文件中添加上述行
add the above lines in the application build.gradle file inside android block for android app
首先给这个问题加注星标,以便 Google 最终修复该错误。如果您在 Mac 或 Linux 上运行,可以在此处修复该错误。除此之外,您唯一的选择是对 Dojo 进行构建,以便它仅位于一个文件中。
First go star this issue so Google will fix the bug eventually. If you are running on Mac or Linux there is a patched aapt that fixes the bug here. Other than that your only choice is to do a build of Dojo so that it is only in one file.
根据之前的答案,我结束了对位于项目根目录的
ant.properties
的更改:aapt.ignore.assets=!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~
在这里,我覆盖了 sdk-android 目录中定义的
aapt.ignore.assets
属性。有用From the previous answer I ended making changes on
ant.properties
which is located at root of project with this:aapt.ignore.assets=!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~
Here, I overwrote
aapt.ignore.assets
property defined on sdk-android directory. It works对于任何 Dojo 开发人员,或者任何有此问题的人。
在 Android Studio 中为我解决的问题是打开 build.gradle,然后添加到 android 块:
For any Dojo developers out there, or anyone having issues with this in general.
What fixed it for me in Android Studio is opening the build.gradle, then adding to the android block:
解决方法是使用 CDN 中的 dojo.js
另外,我开始寻找一个 minify 应用程序或服务,它可以从所有必需的 dojo 文件创建一个文件,但没有轻易找到。
A work around is to use dojo.js from the CDN
Also, I started looking for a minify app or service, which could create a single file from all the required dojo files, but did not find one easily.