eclipse stuck at running program
Posted
by
user1434388
on Stack Overflow
See other posts from Stack Overflow
or by user1434388
Published on 2012-07-11T08:31:17Z
Indexed on
2012/07/11
9:15 UTC
Read the original article
Hit count: 182
This is the picture after I end task the eclipse.
My Android Program has no errors, and before this problem it was all fine. It happened when I added some code into my program. It gets stuck after I click the run button. This also happens when I run my handphone for debugging the program. Other programs are all working fine, only one is stuck.
When I try to remove and import it again seem there is a classes.dex file which I cannot delete, I have to restart my computer for it to allow to delete and I have to force the program to close. I have searched at this website and they said keep open the emulator but it doesn't work for me.
below is the connecting coding that i added.
//check internet connection
private boolean chkConnectionStatus(){
ConnectivityManager connMgr = (ConnectivityManager)
this.getSystemService(Context.CONNECTIVITY_SERVICE);
final android.net.NetworkInfo wifi =
connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
final android.net.NetworkInfo mobile =
connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
if( wifi.isAvailable() ){
return true;
}
else if( mobile.isAvailable() ){
return true;
}
else
{
Toast.makeText(this, "Check your internet" , Toast.LENGTH_LONG).show();
return false;
}
}
© Stack Overflow or respective owner