I have made a simple application in which i have use some buttons and some textView.
On button click event i am using the selector which will display the appropriate image base on the Button click action.
But i dont know what happend, and My Emulator got restarted.
I have tried many times but still the emulator got restarted.
Where is the problem i dont know.
Please Help me in that.
Thanks.
And the Error after cleaning the project i got is:
Error:
[2011-10-03 19:01:11 - TaxCalculator] libpng error: Not a PNG file
[2011-10-03 19:01:11 – TaxCalculator] ERROR: Failure processing PNG image E:\Android\Workspace\TaxCalculator\res\drawable-hdpi\email_icon.png
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\contect_us.xml:2: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/wawatermark’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\contect_us.xml:7: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/header_gradient’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\contect_us.xml:11: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/selector_back_button’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\contect_us.xml:25: error: Error: No resource found that matches the given name (at ‘src’ with value ‘@drawable/contact_us_title’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\contect_us.xml:42: error: Error: No resource found that matches the given name (at ‘src’ with value ‘@drawable/phone_icon’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\contect_us.xml:53: error: Error: No resource found that matches the given name (at ‘src’ with value ‘@drawable/email_icon’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\menu_screen.xml:6: error: Error: No resource found that matches the given name (at ‘src’ with value ‘@drawable/tax_calculator_logo’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\menu_screen.xml:14: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/selector_menu_button’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\menu_screen.xml:21: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/selector_menu_button’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\menu_screen.xml:28: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/selector_menu_button’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\layout\menu_screen.xml:35: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/selector_menu_button’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\drawable\selector_back_button.xml:5: error: Error: No resource found that matches the given name (at ‘drawable’ with value ‘@drawable/back_pressed’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\drawable\selector_back_button.xml:8: error: Error: No resource found that matches the given name (at ‘drawable’ with value ‘@drawable/back_normal’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\drawable\selector_menu_button.xml:5: error: Error: No resource found that matches the given name (at ‘drawable’ with value ‘@drawable/button_blue’).
[2011-10-03 19:01:11 – TaxCalculator] E:\Android\Workspace\TaxCalculator\res\drawable\selector_menu_button.xml:8: error: Error: No resource found that matches the given name (at ‘drawable’ with value ‘@drawable/button_white’).
[2011-10-03 19:01:39 – TaxCalculator] Failed to install TaxCalculator.apk on device ’emulator-5554!
[2011-10-03 19:01:39 – TaxCalculator] (null)
[2011-10-03 19:01:39 – TaxCalculator] Launch canceled!
Well, here no one give me answer. But i Got the Solution. Please read this carefully.
Problem:I recently faced an issue where when I added my png file to an Android project it complained that it’s not a PNG file.
Error I faced:
[2011-07-24 19:54:00 – xxxx] libpng error: Not a PNG file
[2011-07-24 19:54:00 – xxxx] ERROR: Failure processing PNG image C:\Users\pawana\workspace\xxxx\res\drawable-nodpi\background.png
[2011-07-24 19:54:00 – xxxx] C:\Users\pawana\workspace\xxxx\res\layout\main.xml:7: error: Error: No resource found that matches the given name (at ‘background’ with value ‘@drawable/background’).
Environment: I was using “windows 7″ for development and that file was opening file as a PNG File on Windows 7. I was puzzled what was happening.
Background: I tried searching the web if someone else faced this issue and what as the solution. There were no good answers. I had verified my PNG was 24 bit. Android does support 24-bit and 32-bit. After lot of research it occured to me that maybe Android does not like the PNG format of “Adobe Photoshop”, too which I used to create the PNG.
Solution: Final solution was to open the png file in MS Paint and re save it as png file. Once I did that Eclipse was able to use that file in Android project. I looked at what it changed, it convered the PNG to 32-bit format. Since Android supports both 24-bit and 32-bit PNGs, it makes me think there is something with “Adobe Phtoshop” generated PNGs which Android does not like.