0

I was trying out an android program for Hello World in eclipse. But while launching the emulator the following message is displayed :-

[2016-05-21 15:00:58 - HelloWorldApp] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2016-05-21 15:00:58 - HelloWorldApp] Please check logcat output for more details.
[2016-05-21 15:00:58 - HelloWorldApp] Launch canceled!

How can I deal with the above problem ????

EDIT :-

I even tried using the -partition-size 1024 trick but it failed too. So what am I supposed to do now ???

Ankit Acharya
  • 2,833
  • 3
  • 18
  • 29

1 Answers1

0

You may check like this create one class that extends Application

class EnsureSpace extends Application{
//Something like this should work:
                    StatFs stat = new
StatFs(Environment.getExternalStorageDirectory().getPath());
                    long bytesAvailable = (long)stat.getBlockSize() *
(long)stat.getBlockCount();
                    long megAvailable = bytesAvailable / 1048576;

if(megAvailable > yoursize){

}
else{
//exit app
}

}
Mahesh Giri
  • 1,810
  • 19
  • 27