Obsolete
Status Update
Comments
ch...@google.com <ch...@google.com> #2
Thank you for submitting this issue. It was last modified before Android Studio 1.0 Launched in 2014. We have made a large number of improvements in Android Studio since 2014 and hope this issue is already resolved. In order to correctly prioritize issues in our upcoming release, we are closing this bug. If you continue to experience your issue on the latest stable version of Android Studio, please submit a new bug report. We apologize for any inconvenience this may cause you.
pa...@google.com <pa...@google.com> #3
This is still the case today. aapt still does not allow > 100 characters in file names. Needs to be redirected to SDK.
si...@google.com <si...@google.com> #4
This bug has not been modified within the last 365 days. If this bug is still valid, please reopen with a current bugreport and repro steps.
bo...@gmail.com <bo...@gmail.com> #5
This bug is still valid on the latest platform-tools / build tools (API 28, Feb 2019).
Scenario: asset packaging.
Console Output:
CommandInvokationFailure: Android Asset Packaging Tool failed.
/Volumes/HD/Android/sdk/build-tools/28.0.1/aapt package -v -f -F raw.ap_ -A raw -0 "" --ignore-assets "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
stderr[
raw/AssetBundle/__art_assets$scenes$map1$desert4k_runtime$tiledscene$sceneobject_biganimated$sceneobject_biganimated_-1_0_2: error: Invalid filename. Unable to add.
]
(the path strings are fictitious)
Scenario: asset packaging.
Console Output:
CommandInvokationFailure: Android Asset Packaging Tool failed.
/Volumes/HD/Android/sdk/build-tools/28.0.1/aapt package -v -f -F raw.ap_ -A raw -0 "" --ignore-assets "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
stderr[
raw/AssetBundle/__art_assets$scenes$map1$desert4k_runtime$tiledscene$sceneobject_biganimated$sceneobject_biganimated_-1_0_2: error: Invalid filename. Unable to add.
]
(the path strings are fictitious)
Description
SDK tools version: 20.0.3
Eclipse version: 4.2.0
ADT plug-in version: 20.0.3.v201208082019-427395
STEPS TO REPRODUCE:
1. Create a new Android project
Launch Eclipse, then under the File menu select New > Android Application Project
Application Name: "TestFileLength"
Project Name: "TestFileLength"
PackageName: "com.example.TestFileLength"
Build SDK: "Android 4.1 (API 16)"
Minimum Required SDK: "API 8: Android 2.2 (Froyo)"
2. Add a new asset file named "file_12_10_123456_20_123456_30_123456_40_123456_50_123456_60_123456_70_123456_80_123456_90_12345_100"
Right-click on the /assets folder and select New > File
File name: "file_12_10_123456_20_123456_30_123456_40_123456_50_123456_60_123456_70_123456_80_123456_90_12345_100"
3. Add a new asset file named "file_12_10_123456_20_123456_30_123456_40_123456_50_123456_60_123456_70_123456_80_123456_90_123456_101"
4. Build and run the project
Under the Run menu select Run
5. Observe project errors.
EXPECTED RESULTS:
The Android project should be able to package files with names longer than 100 characters.
OBSERVED RESULTS:
The file with a 100-character name is packaged without error.
The file with a 101-character name is not packaged.
The console reports:
"[2012-08-13 19:39:44 - TestFileLength] /Users/bma/temp/workspace/TestFileLength/assets/file_12_10_123456_20_123456_30_123456_40_123456_50_123456_60_123456_70_123456_80_123456_90_123456_101: error: Invalid filename. Unable to add."
An "Android Launch" popup alerts:
"Your project contains error(s), please fix them before running your application."
Similar errors are reported when the files are created under /res/raw.
ADDITIONAL INFORMATION:
Similar errors result when compiling from command line with "ant release" or "ant debug":
"...-package-resources:
[aapt] Creating full resource package...
[aapt] /Users/bma/temp/workspace/TestFileLength/assets/file_12_
[aapt] 10_123456_20_123456_30_123456_40_123456_50_123456_60_123456_70_123456_80_123456_90_123456_101: error: Invalid filename. Unable to add.
BUILD FAILED
/usr/local/Cellar/android-sdk/r20.0.1/tools/ant/build.xml:890: The following error occurred while executing this line:
/usr/local/Cellar/android-sdk/r20.0.1/tools/ant/build.xml:907: null returned: 1"
build.xml:907 is:
<aapt executable="${aapt}"
command="package"
versioncode="${version.code}"
versionname="${
debug="${build.is.packaging.debug}"
manifest="${out.manifest.abs.file}"
assets="${asset.absolute.dir}"
androidjar="${project.target.android.jar}"
apkfolder="${out.absolute.dir}"
nocrunch="${build.packaging.nocrunch}"
resourcefilename="${
resourcefilter="${aapt.resource.filter}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
previousBuildType="${build.last.target}"
buildType="${build.target}"
ignoreAssets="${aapt.ignore.assets}">