Fixed
Status Update
Comments
va...@gmail.com <va...@gmail.com> #2
I am facing the same problem. Is this issue going to be solved anytime soon ? Thanks.
th...@gmail.com <th...@gmail.com> #3
I got the same problem. This comes from the aapt tool.
Here is a patch (done in the Eclair branch) of the aapt tool to fix this issue:
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 20a002d..1275a81 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -67,13 +67,6 @@ static bool isHidden(const char *root, const char *path)
return true;
}
type = "hidden";
- } else if (path[0] == '_') {
- // skip directories starting with _ (don't chatter about it)
- String8 subdirName(root);
- subdirName.appendPath(path);
- if (getFileType(subdirName.string()) == kFileTypeDirectory) {
- return true;
- }
} else if (strcmp(path, "CVS") == 0) {
// Skip CVS but don't chatter about it.
return true;
Here is a patch (done in the Eclair branch) of the aapt tool to fix this issue:
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 20a002d..1275a81 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -67,13 +67,6 @@ static bool isHidden(const char *root, const char *path)
return true;
}
type = "hidden";
- } else if (path[0] == '_') {
- // skip directories starting with _ (don't chatter about it)
- String8 subdirName(root);
- subdirName.appendPath(path);
- if (getFileType(subdirName.string()) == kFileTypeDirectory) {
- return true;
- }
} else if (strcmp(path, "CVS") == 0) {
// Skip CVS but don't chatter about it.
return true;
v....@rocketmail.com <v....@rocketmail.com> #4
hey guys can someone give me the sdk with this change? best regards, vladimir
oh...@ohmyhead.com <oh...@ohmyhead.com> #5
I'm voting this up. If I want to build a PhoneGap or javascript-based app with Dojo, I'm out of luck. Dojo javascript frameworks uses the underscore character at the beginning of a whole lot of files.
re...@gmail.com <re...@gmail.com> #6
Ditto for me. underscore preceding folder/file names is a common convention.
ma...@gmail.com <ma...@gmail.com> #7
+1. Same issue with Dojo, Phonegap, and leading _ files. Bleh.
dk...@gmail.com <dk...@gmail.com> #8
Same issue, python stuff included in an SL4a project, and yes, bleh.
[Deleted User] <[Deleted User]> #9
Likewise, I've been burned by this on cross-platform development.
[Deleted User] <[Deleted User]> #10
Oh, and if this is some sort of ad-hoc method for having "hidden" files not being put into the assets directory, I have to ask: why would you be putting a file into your assets tree if you don't want it to be, you know, an asset?
re...@gmail.com <re...@gmail.com> #11
3 months later, and no response/action from Google. Hello....Is anybody in there?
ja...@gmail.com <ja...@gmail.com> #12
This would be very useful to be able to toggle as an option.
ph...@gmail.com <ph...@gmail.com> #13
+1 for the option. Meanwhile, compiled versions of the modified aapt, for Linux and MacOS (thanks to Thomas, comment #2 ), are available at: http://hanji.info/download/utils/
Replace the original ones located in $SDK_DIR/platform-tools and $SDK_DIR/platforms/android-*/tools.
md5 checksums:
- 166ac534ac49201168de17f02bb1003b aapt_with_underscore_for_linux
- 7b01db568035eccd3445f433fa335862 aapt_with_underscore_for_mac
Replace the original ones located in $SDK_DIR/platform-tools and $SDK_DIR/platforms/android-*/tools.
md5 checksums:
- 166ac534ac49201168de17f02bb1003b aapt_with_underscore_for_linux
- 7b01db568035eccd3445f433fa335862 aapt_with_underscore_for_mac
wo...@gmail.com <wo...@gmail.com> #14
Is there a fix for Windows? I'm having this same issue...
oi...@gmail.com <oi...@gmail.com> #15
This has caused me cross-platform issues as well. No error / warning message generated for folders starting with an underscore made this issue that much more frustrating.
kt...@gmail.com <kt...@gmail.com> #16
why is this getting 0 attention for an official fix? I switched out my aapt for mac and now I get ERROR: Unknown option '--no-crunch' -- guessing aapt has been updated but still hasnt been patched for a common file name usage....
mr...@gmail.com <mr...@gmail.com> #17
same here, and it's valid also for folders. They are skipped by the packing tool with no warning whatsoever.
th...@gmail.com <th...@gmail.com> #18
does any1 have a workaround? this is so annoying
de...@gmail.com <de...@gmail.com> #19
Still have this problem with Dojo
bv...@gmail.com <bv...@gmail.com> #21
I am having this problem with Dojo and Android also. Is their a fix for aapt for Windows or a good workaround?
tx...@gmail.com <tx...@gmail.com> #22
Doing python stuff on android, the _ issue is making the whole usage more complex! Please, do something google!
cj...@gmail.com <cj...@gmail.com> #23
I perfectly understand Google might want to keep the default behavior as it is now but an option should be added to allow underscored files. This is very common in a wide variety of frameworks to get underscored file and if that is not your assets that you are packing it might not be easy to rename them.
su...@gmail.com <su...@gmail.com> #24
I have found a workaround for my app which needed dojox.charting. Basically it involves bundling the files into a .tar file, including it in the res/raw and unpacking on first launch. If any of you are interested, please post a question on stackoverflow and I will include the details.
co...@gmail.com <co...@gmail.com> #26
I would also be interested in a windows build of aapt .. or even better the feature to be fixed for all of us
ph...@gmail.com <ph...@gmail.com> #27
Seriously, please change this...
[Deleted User] <[Deleted User]> #28
Getting these build errors with Sencha Touch 2.0 Beta 3 too
kt...@gmail.com <kt...@gmail.com> #29
Maybe we should all just open related tickets every day until they fix it... this is outrageous for such a stupid defect to survive this long.
re...@gmail.com <re...@gmail.com> #30
Given that this bug is over 2 years old with nary a comment from Google, it seems to safe to assume that this bug reporting mechanism is merely a sop for developers. I wish they at least had the class to say "we aren't going to fix this".
ma...@gmail.com <ma...@gmail.com> #31
I just hit this bug. What a pain in the ass! Can you resolve this by creating a dojo profile?
kt...@gmail.com <kt...@gmail.com> #32
a profile build should avoid this bug, its just a hinderance for testing purposes to build between changes
ma...@gmail.com <ma...@gmail.com> #33
Here's a workaround for developers who just want to get back to work:
1. Go to Dojo's website and download the full-source dojo release version.
2. Extract it.
3. Under util/buildscripts/profiles, create a profile as follows and save as YOUR_PROFILE_NAME.profile.js
dependencies = {
optimize:"shrinksafe",
layerOptimize:"closure",
stripConsole:"normal",
selectorEngine:"acme",
layers: [
{
name: "dojo.js",
dependencies: [
"dojox.mobile.parser",
"dojox.mobile",
"dojox.mobile.compat",
"dojox.mobile.Button",
"dojox.mobile.ScrollableView",
"dojox.mobile.TextBox",
"dojox.mobile.TextArea"
]
}
],
prefixes: [
[ "dijit", "../dijit" ],
[ "dojox", "../dojox" ]
]
}
4. Go to the util/buildscripts directory.
5. Run the following command:
build profile=YOUR_PROFILE_NAME optimize=shrinksafe.keepLines cssOptimize=comments.keepLines cssImportIgnore=../dijit.css action=release version=1.0
6. Under release, copy in the dojox/mobile and dojo/dojo.js into Eclipse.
7. Remember to use dojo.require("") for all your widget types.
8. Magically problem goes away!
1. Go to Dojo's website and download the full-source dojo release version.
2. Extract it.
3. Under util/buildscripts/profiles, create a profile as follows and save as YOUR_PROFILE_NAME.profile.js
dependencies = {
optimize:"shrinksafe",
layerOptimize:"closure",
stripConsole:"normal",
selectorEngine:"acme",
layers: [
{
name: "dojo.js",
dependencies: [
"dojox.mobile.parser",
"dojox.mobile",
"dojox.mobile.compat",
"dojox.mobile.Button",
"dojox.mobile.ScrollableView",
"dojox.mobile.TextBox",
"dojox.mobile.TextArea"
]
}
],
prefixes: [
[ "dijit", "../dijit" ],
[ "dojox", "../dojox" ]
]
}
4. Go to the util/buildscripts directory.
5. Run the following command:
build profile=YOUR_PROFILE_NAME optimize=shrinksafe.keepLines cssOptimize=comments.keepLines cssImportIgnore=../dijit.css action=release version=1.0
6. Under release, copy in the dojox/mobile and dojo/dojo.js into Eclipse.
7. Remember to use dojo.require("") for all your widget types.
8. Magically problem goes away!
ma...@gmail.com <ma...@gmail.com> #34
Wasted almost 3 hours trying to figure out what was going on. Was pulling hair out until I found this bug report.
yu...@gmail.com <yu...@gmail.com> #35
Wasted almost 40 minutes trying to figure out what was going on. Was pulling hair out until I found this bug report. Still, this must be documented somewhere if not fixed.
pa...@voltar.org <pa...@voltar.org> #36
[Comment deleted]
je...@gmail.com <je...@gmail.com> #37
I don't know why google even bothers with feedback, bug trackers, and support forums. They do not give a shit about people using their stuff, they just kinda do their own thing and ignore all the users unless they were planning to do something anyway. This is probably the 10th one of these threads where I post at the end of 40 insightful comments on a bug or feature request that google has ignored for years.
sy...@gmail.com <sy...@gmail.com> #38
Really annoying like a lot of other choices they made for Android development tools...
bo...@gmail.com <bo...@gmail.com> #39
Please update ASAP, it's unbelievable this defect has been open for 2-3 years
It's an indictment of open source projects
It's an indictment of open source projects
ph...@gmail.com <ph...@gmail.com> #40
Just cook your work around or branch and move on. I'm too tired of getting useless email notifications for that: without access to google management (i.e. few millions $ to put on the table) or personal links with devs, this kind of portal/whatever is just a mirage.
ra...@android.com <ra...@android.com> #41
Fixed in AOSP by:
- frameworks/base.git: 90897ed87bce639bf6bb2ccf15fbabb59b131bab
- sdk.git: 6a98de15b34aad728c6a28fa8da0d9fe4e9fe4f5
TL;DR: in tools r20 with platform-tools r12, this will be fixed by setting a property named "aapt.ignore.assets" in project.properties using the format explained inhttps://android-review.googlesource.com/#/c/36532/4/files/ant/build.xml
- frameworks/base.git: 90897ed87bce639bf6bb2ccf15fbabb59b131bab
- sdk.git: 6a98de15b34aad728c6a28fa8da0d9fe4e9fe4f5
TL;DR: in tools r20 with platform-tools r12, this will be fixed by setting a property named "aapt.ignore.assets" in project.properties using the format explained in
cj...@gmail.com <cj...@gmail.com> #42
Thanks for the fix, really looking forward to see that integrated in a release.
ni...@gmail.com <ni...@gmail.com> #43
[Comment deleted]
ni...@gmail.com <ni...@gmail.com> #44
hello,
I updated tools to r20 and platform-tools to r13.
I Added aapt.ignore.assets property in project.properties according to format explained in build.xml.
But the apk still does not change, it does not include the files i want .... please help !
Regards.
I updated tools to r20 and platform-tools to r13.
I Added aapt.ignore.assets property in project.properties according to format explained in build.xml.
But the apk still does not change, it does not include the files i want .... please help !
Regards.
jo...@gmail.com <jo...@gmail.com> #45
I still could not get the underscore file to be include in the build. The fix doesn't seem to be effective.
Please advise!
Please advise!
ms...@gmail.com <ms...@gmail.com> #46
[Comment deleted]
dk...@gmail.com <dk...@gmail.com> #47
sc...@gmail.com <sc...@gmail.com> #48
Still relevant in august 2014.
This is getting very annoying now that more hybrid projects are taking off.
Overwriting the exclusions list does not seem to work.
This is getting very annoying now that more hybrid projects are taking off.
Overwriting the exclusions list does not seem to work.
ap...@codeblock.io <ap...@codeblock.io> #49
This is unacceptable. Why is this not getting fixed?
ge...@gmail.com <ge...@gmail.com> #50
...Still relevant in July 2016...
al...@gmail.com <al...@gmail.com> #51
Getting the same problema using a Worklight/Cordova/Dojo project.
Android 6+ is broken.
Android 6+ is broken.
sh...@gmail.com <sh...@gmail.com> #52
[Comment deleted]
jo...@gmail.com <jo...@gmail.com> #53
I had no luck getting "aapt.ignore.assets" to work, so as an ugly hack I ended up extending the build process to add any asset files with a parent directory starting with an underscore to the debug APK after it's first assembled, and then resign the APK with the new files.
Fix can be found here:https://gist.github.com/anonymous/97c6c6d0a6697886bb35471d6f99fc8d
To install when using Cordova, copy the two files from the gist into your "platforms/android" directory, and make the shell script executable: `chmod +x build-extras-underscore-dirs.sh". The "build-extras.gradle" file will ensure this script gets run when the debug APK is produced.
I've only tested this on macOS. In theory it should work on other POSIX/BSD systems, and the shell script could be rewritten as a batch file for Windows. In my use case (Dojo) I only need/want this script to run for debug builds, however build-extras.gradle could be modified to include release builds if you need.
Hope this helps!
Fix can be found here:
To install when using Cordova, copy the two files from the gist into your "platforms/android" directory, and make the shell script executable: `chmod +x build-extras-underscore-dirs.sh". The "build-extras.gradle" file will ensure this script gets run when the debug APK is produced.
I've only tested this on macOS. In theory it should work on other POSIX/BSD systems, and the shell script could be rewritten as a batch file for Windows. In my use case (Dojo) I only need/want this script to run for debug builds, however build-extras.gradle could be modified to include release builds if you need.
Hope this helps!
ir...@gmail.com <ir...@gmail.com> #54
Have anyone tried above fix #53 on windows??
In need of some guide to change them from shell script to batch file
In need of some guide to change them from shell script to batch file
ma...@gmail.com <ma...@gmail.com> #55
I added the following to my ~/.bash_profile to workaround this issue
export ANDROID_AAPT_IGNORE="!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
On Windows an environment variable with that value should probably work.
I changed the default value to not include <dir>_*
http://grepcode.com/file/repo1.maven.org/maven2/com.android.tools/sdk-common/24.0.1/com/android/ide/common/res2/DataSet.java#514
Note make sure you clean the build and restart Studio or your console.
export ANDROID_AAPT_IGNORE="!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
On Windows an environment variable with that value should probably work.
I changed the default value to not include <dir>_*
Note make sure you clean the build and restart Studio or your console.
Description
build script with a message like:
[null] (skipping (null) file '_filename.txt')
Folders starting with an underscore are omitted without warning.
Is it possible to force inclusion of folders starting with an underscore, or
at least warn when they are not included.