AndroidTraining
AndroidTraining copied to clipboard
AaptException on NTFS
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
現在のディレクトリ構成が
AndroidStudio/[practice|assignments]/fundamentals/5th/{実習、課題名}/app
のような感じで冗長なので
AndroidStudio/fundamentals/5th/{実習、課題名}
13文字以上は節約できそうなのでディレクトリ構成の変更をするといいのかも #158 でプロジェクトの読み込み方法はAndroidStudio直下のbuild.gradleで読み込むようにするので、ディレクトリの移動はディレクトリ移動+settings.gradleのパスの修正のみで良くなるはず
@punchdrunker @hidey
Upgrading the Gradle version solves the issue.