Android Studio Wear App Error - Unable to Open PNG

喜欢而已 提交于 2019-11-28 04:00:26

问题


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


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/24875555/android-studio-wear-app-error-unable-to-open-png

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!