Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Wear App Error - Unable to Open PNG

I'm getting the following error after creating a new wear app. I'm also getting this in the example app found in the sdk folder.

C:\Users\Tom\AppData\Local\Android\android-studio1\sdk\samples\android-20\wearable\SynchronizedNotifications\Application\build\intermediates\exploded-aar\com.google.android.gms\play-services\5.0.77\res\drawable-mdpi\common_signin_btn_text_disabled_focus_light.9.png ERROR: Unable to open PNG file

enter image description here

like image 698
TWilly Avatar asked Jul 21 '14 22:07

TWilly


2 Answers

It's related to the directory and file name length. I believe it needs to be under 256 characters.

C:\Users\Tom\AppData\Local\Android\android-studio1\sdk\samples\android-20\wearable\SynchronizedNotifications\Application\build\intermediates\exploded-aar\com.google.android.gms\play-services\5.0.77\res\drawable-mdpi\common_signin_btn_text_disabled_focus_light.9.png

is 265 characters.

Moving the project to a lower directory fixed the issue.

I'm going to try implementing a hardlink to the directory to shorten the name so I won't have to update the directory structure.

I also submitted a ticket with the android dev team. Currently priority is set to small... https://code.google.com/p/android/issues/detail?id=73873

like image 156
TWilly Avatar answered Nov 13 '22 03:11

TWilly


The build file path exceeds the Windows max path length (260 characters). Please make sure that your android project path is not too long and try to use short names as well.

Refer to the following link for additional details.

like image 33
Aymen Touzi Avatar answered Nov 13 '22 03:11

Aymen Touzi