Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

AaptException on NTFS #142

Open
punchdrunker opened this issue Nov 19, 2016 · 2 comments
Open

AaptException on NTFS #142

punchdrunker opened this issue Nov 19, 2016 · 2 comments

Comments

@punchdrunker
Copy link
Contributor

punchdrunker commented Nov 19, 2016

windowsだと課題をcloneした場所によってはリソースファイルなどの絶対パスが240文字を超過してビルド時にエラーが起きてしまう.

Error:com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\nanao\GitHub\AndroidTraining\AndroidStudio\practice\fundamentals\4th\MessagingAndNotification\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.4.0\res\drawable-xhdpi-v4\abc_list_selector_disabled_holo_light.9.png into C:\Users\nanao\GitHub\AndroidTraining\AndroidStudio\practice\fundamentals\4th\MessagingAndNotification\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\abc_list_selector_disabled_holo_light.9.png
Error:Execution failed for task ':1-4-MessagingAndNotificationPractice:mergeDebugResources'.
> Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\nanao\GitHub\AndroidTraining\AndroidStudio\practice\fundamentals\4th\MessagingAndNotification\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.4.0\res\drawable-xhdpi-v4\abc_list_selector_disabled_holo_light.9.png into C:\Users\nanao\GitHub\AndroidTraining\AndroidStudio\practice\fundamentals\4th\MessagingAndNotification\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\abc_list_selector_disabled_holo_light.9.png

同様の事例
http://stackoverflow.com/questions/39621250/how-to-fix-com-android-builder-internal-aapt-aaptexception-failed-to-crunch-fil

@hidey
Copy link
Contributor

hidey commented Mar 21, 2018

現在のディレクトリ構成が

AndroidStudio/[practice|assignments]/fundamentals/5th/{実習、課題名}/app

のような感じで冗長なので

AndroidStudio/fundamentals/5th/{実習、課題名}

13文字以上は節約できそうなのでディレクトリ構成の変更をするといいのかも
#158 でプロジェクトの読み込み方法はAndroidStudio直下のbuild.gradleで読み込むようにするので、ディレクトリの移動はディレクトリ移動+settings.gradleのパスの修正のみで良くなるはず

@kritipchakrabarti
Copy link

@punchdrunker @hidey

Upgrading the Gradle version solves the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants