My project was fine, I just copied the code to another PC, and installed the packages, this error keeps appearing with every Build: Failure processing PNG files (and points to othen png files created automatically !)
Output:
1>C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-hdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png : error APT0000: Unable to open PNG file
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1429,2): error APT0000: Failure processing PNG image C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-xhdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1429,2): error APT0000: Failure processing PNG image C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-hdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png
1>C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-xxhdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png : error APT0000: Unable to open PNG file
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1429,2): error APT0000: Failure processing PNG image C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-xxhdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png
1>C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-mdpi-v4\abc_btn_check_to_on_mtrl_000.png : error APT0000: Unable to open PNG file
Answers
Did you copy the png files too ?
Yes I did.
@Nsr.2211 Did you try to delete bin/obj folders ?
Yes I did my Google !
Also, When I try to open an Image by clicking on it on the solution explorer, a message box appears saying that there is no app that can open .png file..
It seems that I'm also experiencing the same problem after updating my Xamarin to its current version.
Environment
Visual Studio 2015 (14.0.25431)
Xamarin 4.9.0.753
Xamarin.Android SDK 8.2.0.16
Error
Error Failure processing PNG image obj\Debug\res\drawable\Icon.png
Error Unable to open PNG file ConnectTest C:\Users\Pat\Documents\Visual Studio 2015\Projects\ConnectTest\ConnectTest\Resources\drawable\Icon.png
I tried deleting the obj/bin folder, did a clean/rebuild, as well as any Xamarin related cache in local app data, but the problem still persists.
I also tried changing the compile using Android version, but the problem still persists.
I also tried loading other Xamarin Android related project that used to work (clean checkout), but it seems that whenever I tried compiling, the same error appears.
I was also able to verify that the PNG does exists.
I've read from others that the problem might be resolved by reinstalling, not sure if this is gonna work, but as much as possible, I want to do it only as a last resort, and at the same time, finding the root cause why this is happening.
@Nsr.2211
Have you tried to create a blank project in another PC and copy the code to it?
even the blank project has the same problem
@Nsr.2211
Please use VS2017 instead of VS2015.
I am using VS2017
i have the same problem
Delete all Xamarin Folders from C:\Users\YourUser\AppData\Local and the \bin \obj folders from you Visual Studio Projects.
1-Close the VS
2-Go to your folder C:\Users\xxx\Downloads\BogMobileAPP\BogMobileAPP\BogApp\BogApp.Android\obj\Debug\lp\39\jl\res\drawable-hdpi-v4\
3-Delete the image abc_ab_share_pack_mtrl_alpha.9.png
4-Copy it again to your folder
try it , It's worked with me
There might be problem with an access to the file or image. just try o run VS as an administrator and the problem should be solved .