Here is a custom function I made that will delete all files in a folder older than N time.

Time here can be minutes, seconds or hours by using the strtotime() function. So for example, if you want to delete old files less than 4 hours, you can call strtotime(‘-4 hours’).

This one was another pain. The error message is misleading one would think right away there is something wrong in the XML layout file.

Although there may be times the cause would be that, the most obvious cause for this is when you have large images placed in only one drawable folder.

In my case, I placed the image in the drawable-sw600dp-hdpi folder and when I deployed it in my Samsung Galaxy S2, it produced this error because Android resized the image as a Bitmap in every row in the Listview.

As well, I guess it ran out of memory since the phone only has 1GB of RAM unlike my Nexus 7 2nd Gen where it has 2GB of RAM so that masked the real cause lay on the image being resized.

The more rows shown in the ListView, the more probable occurrence that this error message will show up and crash the app.

Try to add the same images in all the drawable folders regardless if they are resized to a smaller resolution or not. At least, the Android OS will just pick up the images right away without having to resize them accordingly.

Well, this one is easy. Just move it to any place you like. Once transferred, you need to tell your Eclipse where the new location is located so that all succeeding module installations will be placed there.

In your Eclipse environment, go to Window > Preferences > Android.

Change the SDK Location and that’s it!

Related Posts Plugin for WordPress, Blogger...