[android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-19 Thread aMeeN
HELLO Dear Greg,

YAH   IT WORKS IT WORKS

THANK YOU   THANK YOU  THANK YOU S MUCH

I really appreciate your help ... you rescued me from giving up ...

for(i = 1 ; i > 0; i++)
{
Thank you man .. you saved me time XD
}

aMeeN


On Jun 20, 12:42 am, Greg Krimer  wrote:
> Hi aMeeN
>
> The LogCat view is your friend. The cause of the error will always be
> displayed there. To display the LogCat view in the current perspective in
> Eclipse go to Window->Show View->Other->Android->LogCat.
>
> When I ran your code, I saw this in the LogCat view:
>
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279): FATAL EXCEPTION: main
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279): java.lang.RuntimeException:
> Unable to start activity
> ComponentInfo{ameen.android.silentModeToggle/ameen.android.silentModeToggle 
> .SilentModelToggleActivity}:
> java.lang.NullPointerException
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.ActivityThread.access$2300(ActivityThread.java:125)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.os.Looper.loop(Looper.java:123)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.ActivityThread.main(ActivityThread.java:4627)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
> 868)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> dalvik.system.NativeStart.main(Native Method)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279): Caused by:
> java.lang.NullPointerException
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> ameen.android.silentModeToggle.SilentModelToggleActivity.onCreate(SilentMod 
> elToggleActivity.java:22)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
> 06-19 21:34:29.586: ERROR/AndroidRuntime(279):     ... 11 more
>
> As you can see, the cause of the problem is just a NullPointerException on
> line 22 of your activity owing to the fact that mAudioManager is used before
> it is unitialized. You initialize it on line 28. I was able to get your app
> to run by uncommenting the code and changing the onCreate() method to the
> following:
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE);
>         int ringerMode = mAudioManager.getRingerMode();
>
>         checkIfPhoneIsSilent();
>
>         setButtonClickListener();
>     }
>
> Not a bad first Android app!
>
>
>
>
>
>
>
> On Sun, Jun 19, 2011 at 8:46 AM, aMeeN  wrote:
> > Hello All,
>
> > I downloaded Eclipse Java (this time) and did all the integration and
> > linking with Android SDK after I finished ...
> > I tried to run the application again .. but unfortunately getting the
> > same error.
>
> > I am seriously started thinking to give up   with android
> > development .. this is one bug takes me around 10 days
>
> > I will give it some more tries and will see.
>
> > On Jun 18, 11:14 am, aMeeN  wrote:
> > > Thank you Mr. Zsolt for your help.
>
> > > I wasn't sure about the error reason, Android and Eclipse both are new
> > > to me .. thats why I am confused.
>
> > > I will try to download Eclipse and prepare the development environment
> > > again.
>
> > > Hope it will work properly .. I will update this post with the
> > > result.
>
> > > Thanks again.
>
> > > On Jun 18, 7:29 am, Zsolt Vasvari  wrote:
>
> > > > Why do you think the error is caused by your code?  The stack trace
> > > > you are showing has got something to do with Eclipse, not an Android
> > > > application.
>
> > > > On Jun 17, 10:25 pm, aMeeN  wrote:
>
> > > > > I am writing my first Andoid application. And facing an error .. I
> > > > > consider it too strange but also expecting to face a lot of strange
> > > > > errors and bugs.
>
> > > > > I googl

[android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-19 Thread aMeeN
I learned a new way to debug on eclipse using DDMS

and in LogCat tab I got these details:

06-20 02:16:27.474: DEBUG/AndroidRuntime(5289): >>
AndroidRuntime START <<
06-20 02:16:27.485: DEBUG/AndroidRuntime(5289): CheckJNI is ON
06-20 02:16:27.735: DEBUG/AndroidRuntime(5289): --- registering native
functions ---
06-20 02:16:28.755: DEBUG/AndroidRuntime(5289): Shutting down VM
06-20 02:16:28.755: DEBUG/dalvikvm(5289): Debugger has detached;
object registry had 1 entries
06-20 02:16:28.784: INFO/AndroidRuntime(5289): NOTE: attach of thread
'Binder Thread #3' failed
06-20 02:16:29.364: DEBUG/AndroidRuntime(5297): >>
AndroidRuntime START <<
06-20 02:16:29.374: DEBUG/AndroidRuntime(5297): CheckJNI is ON
06-20 02:16:29.624: DEBUG/AndroidRuntime(5297): --- registering native
functions ---
06-20 02:16:31.334: INFO/ActivityManager(59): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1000
cmp=ameen.android.silentModeToggle/.SilentModelToggleActivity }
06-20 02:16:31.644: INFO/ActivityManager(59): Start proc
ameen.android.silentModeToggle for activity
ameen.android.silentModeToggle/.SilentModelToggleActivity: pid=5317
uid=10037 gids={}
06-20 02:16:31.684: DEBUG/AndroidRuntime(5297): Shutting down VM
06-20 02:16:31.704: DEBUG/dalvikvm(5297): Debugger has detached;
object registry had 1 entries
06-20 02:16:31.755: INFO/AndroidRuntime(5297): NOTE: attach of thread
'Binder Thread #3' failed
06-20 02:16:33.024: DEBUG/dalvikvm(5317): GC_EXTERNAL_ALLOC freed 638
objects / 51312 bytes in 87ms
06-20 02:16:33.074: DEBUG/AndroidRuntime(5317): Shutting down VM
06-20 02:16:33.074: WARN/dalvikvm(5317): threadid=1: thread exiting
with uncaught exception (group=0x4001d800)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): FATAL EXCEPTION: main
06-20 02:16:33.104: ERROR/AndroidRuntime(5317):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{ameen.android.silentModeToggle/
ameen.android.silentModeToggle.SilentModelToggleActivity}:
java.lang.NullPointerException
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2663)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2679)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.os.Looper.loop(Looper.java:123)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.ActivityThread.main(ActivityThread.java:4627)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
java.lang.reflect.Method.invokeNative(Native Method)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
java.lang.reflect.Method.invoke(Method.java:521)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
dalvik.system.NativeStart.main(Native Method)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): Caused by:
java.lang.NullPointerException
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
ameen.android.silentModeToggle.SilentModelToggleActivity.onCreate(SilentModelToggleActivity.java:
22)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2627)
06-20 02:16:33.104: ERROR/AndroidRuntime(5317): ... 11 more
06-20 02:16:33.134: WARN/ActivityManager(59):   Force finishing
activity ameen.android.silentModeToggle/.SilentModelToggleActivity
06-20 02:16:33.688: WARN/ActivityManager(59): Activity pause timeout
for HistoryRecord{44ea3408
ameen.android.silentModeToggle/.SilentModelToggleActivity}
06-20 02:16:44.662: WARN/ActivityManager(59): Activity destroy timeout
for HistoryRecord{44ea3408
ameen.android.silentModeToggle/.SilentModelToggleActivity}
06-20 02:16:44.724: DEBUG/SntpClient(59): request time failed:
java.net.SocketException: Address family not supported by protocol
06-20 02:18:03.184: INFO/Process(5317): Sending signal. PID: 5317 SIG:
9
06-20 02:18:03.204: INFO/ActivityManager(59): Process
ameen.android.silentModeToggle (pid 5317) has died.
06-20 02:18:03.275: WARN/InputManagerService(59): Window already
focused, ignoring focus gain of:
com.android.internal.view.IInputMethodClient$Stub$Proxy@450c99c8

but I understand noting =(


I app

Re: [android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-19 Thread Greg Krimer
Hi aMeeN

The LogCat view is your friend. The cause of the error will always be
displayed there. To display the LogCat view in the current perspective in
Eclipse go to Window->Show View->Other->Android->LogCat.

When I ran your code, I saw this in the LogCat view:

06-19 21:34:29.586: ERROR/AndroidRuntime(279): FATAL EXCEPTION: main
06-19 21:34:29.586: ERROR/AndroidRuntime(279): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{ameen.android.silentModeToggle/ameen.android.silentModeToggle.SilentModelToggleActivity}:
java.lang.NullPointerException
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.os.Looper.loop(Looper.java:123)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.ActivityThread.main(ActivityThread.java:4627)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
java.lang.reflect.Method.invokeNative(Native Method)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
java.lang.reflect.Method.invoke(Method.java:521)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
dalvik.system.NativeStart.main(Native Method)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): Caused by:
java.lang.NullPointerException
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
ameen.android.silentModeToggle.SilentModelToggleActivity.onCreate(SilentModelToggleActivity.java:22)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-19 21:34:29.586: ERROR/AndroidRuntime(279): ... 11 more

As you can see, the cause of the problem is just a NullPointerException on
line 22 of your activity owing to the fact that mAudioManager is used before
it is unitialized. You initialize it on line 28. I was able to get your app
to run by uncommenting the code and changing the onCreate() method to the
following:

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE);
int ringerMode = mAudioManager.getRingerMode();

checkIfPhoneIsSilent();

setButtonClickListener();
}

Not a bad first Android app!

On Sun, Jun 19, 2011 at 8:46 AM, aMeeN  wrote:

> Hello All,
>
>
> I downloaded Eclipse Java (this time) and did all the integration and
> linking with Android SDK after I finished ...
> I tried to run the application again .. but unfortunately getting the
> same error.
>
> I am seriously started thinking to give up   with android
> development .. this is one bug takes me around 10 days
>
> I will give it some more tries and will see.
>
>
> On Jun 18, 11:14 am, aMeeN  wrote:
> > Thank you Mr. Zsolt for your help.
> >
> > I wasn't sure about the error reason, Android and Eclipse both are new
> > to me .. thats why I am confused.
> >
> > I will try to download Eclipse and prepare the development environment
> > again.
> >
> > Hope it will work properly .. I will update this post with the
> > result.
> >
> > Thanks again.
> >
> > On Jun 18, 7:29 am, Zsolt Vasvari  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Why do you think the error is caused by your code?  The stack trace
> > > you are showing has got something to do with Eclipse, not an Android
> > > application.
> >
> > > On Jun 17, 10:25 pm, aMeeN  wrote:
> >
> > > > I am writing my first Andoid application. And facing an error .. I
> > > > consider it too strange but also expecting to face a lot of strange
> > > > errors and bugs.
> >
> > > > I googled to find out what cause that error. And tried to learn how
> to
> > > > debug Android application on Eclipse but no luck.
> >
> > > > The application I am writing is having only an image and button. The
> > > > button is to switch the mobile from normal mode to silent mode and
> the
> > > > reverse and the image is an indicator the for which mode currently is
> > > > active.
> >
> > > > When I got the error I highlighted all the the code and started
> > > > unhighligh

[android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-19 Thread aMeeN
Hello All,


I downloaded Eclipse Java (this time) and did all the integration and
linking with Android SDK after I finished ...
I tried to run the application again .. but unfortunately getting the
same error.

I am seriously started thinking to give up   with android
development .. this is one bug takes me around 10 days

I will give it some more tries and will see.


On Jun 18, 11:14 am, aMeeN  wrote:
> Thank you Mr. Zsolt for your help.
>
> I wasn't sure about the error reason, Android and Eclipse both are new
> to me .. thats why I am confused.
>
> I will try to download Eclipse and prepare the development environment
> again.
>
> Hope it will work properly .. I will update this post with the
> result.
>
> Thanks again.
>
> On Jun 18, 7:29 am, Zsolt Vasvari  wrote:
>
>
>
>
>
>
>
> > Why do you think the error is caused by your code?  The stack trace
> > you are showing has got something to do with Eclipse, not an Android
> > application.
>
> > On Jun 17, 10:25 pm, aMeeN  wrote:
>
> > > I am writing my first Andoid application. And facing an error .. I
> > > consider it too strange but also expecting to face a lot of strange
> > > errors and bugs.
>
> > > I googled to find out what cause that error. And tried to learn how to
> > > debug Android application on Eclipse but no luck.
>
> > > The application I am writing is having only an image and button. The
> > > button is to switch the mobile from normal mode to silent mode and the
> > > reverse and the image is an indicator the for which mode currently is
> > > active.
>
> > > When I got the error I highlighted all the the code and started
> > > unhighlighting one by one, till I found the this line specifically
> > > cause the error:
>
> > > int ringerMode = mAudioManager.getRingerMode();
>
> > > when I run the application, on the Debug prespective view , in the
> > > error log tab I am getting :
>
> > > Error:
>
> > > No command output when running: 'am start -n
> > > ameen.android.silentModeToggle/
> > > ameen.android.silentModeToggle.SilentModelToggleActivity -a
> > > android.intent.action.MAIN -c android.intent.category.LAUNCHER' on
> > > device emulator-5554
>
> > > Exception Stack Track:
>
> > > com.android.ddmlib.ShellCommandUnresponsiveException
> > >         at 
> > > com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
> > > 408)
> > >         at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
> > >         at
> > > com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAc
> > >  ­tion(ActivityLaunchAction.java:
> > > 74)
> > >         at
> > > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchA
> > >  ­pp(AndroidLaunchController.java:
> > > 1147)
> > >         at
> > > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleL
> > >  ­aunch(AndroidLaunchController.java:
> > > 824)
> > >         at
> > > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.access
> > > $3(AndroidLaunchController.java:808)
> > >         at 
> > > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController
> > > $3.run(AndroidLaunchController.java:656)
>
> > > Session Data:
>
> > > eclipse.buildId=M20110210-1200
> > > java.version=1.6.0_24
> > > java.vendor=Apple Inc.
> > > BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
> > > Framework arguments:  -keyring /Users/ameen/.eclipse_keyring -
> > > showlocation
> > > Command-line arguments:  -os macosx -ws cocoa -arch x86 -keyring /
> > > Users/ameen/.eclipse_keyring -showlocation
>
> > > I uploaded the zipped project folder into my DropBox folder if someone
> > > iterested to test it:
>
> > >http://dl.dropbox.com/u/4392604/Silent_Model_Toggle.zip
>
> > > I also explained this bug with screen shots in my blog, if you wanna
> > > have a 
> > > look:http://enabofaisal.wordpress.com/2011/06/17/the-application-process-h...
>
> > > Please someone help me  =)
>
> > > BTW .. as shown above (as Session Data) I have intel x86 MAC OS 10.6
> > > and using Eclipse of these infos:
> > > Eclipse SDK
>
> > > Version: 3.6.2
> > > Build id: M20110210-1200

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-18 Thread aMeeN
Thank you Mr. Zsolt for your help.

I wasn't sure about the error reason, Android and Eclipse both are new
to me .. thats why I am confused.

I will try to download Eclipse and prepare the development environment
again.

Hope it will work properly .. I will update this post with the
result.


Thanks again.

On Jun 18, 7:29 am, Zsolt Vasvari  wrote:
> Why do you think the error is caused by your code?  The stack trace
> you are showing has got something to do with Eclipse, not an Android
> application.
>
> On Jun 17, 10:25 pm, aMeeN  wrote:
>
>
>
>
>
>
>
> > I am writing my first Andoid application. And facing an error .. I
> > consider it too strange but also expecting to face a lot of strange
> > errors and bugs.
>
> > I googled to find out what cause that error. And tried to learn how to
> > debug Android application on Eclipse but no luck.
>
> > The application I am writing is having only an image and button. The
> > button is to switch the mobile from normal mode to silent mode and the
> > reverse and the image is an indicator the for which mode currently is
> > active.
>
> > When I got the error I highlighted all the the code and started
> > unhighlighting one by one, till I found the this line specifically
> > cause the error:
>
> > int ringerMode = mAudioManager.getRingerMode();
>
> > when I run the application, on the Debug prespective view , in the
> > error log tab I am getting :
>
> > Error:
>
> > No command output when running: 'am start -n
> > ameen.android.silentModeToggle/
> > ameen.android.silentModeToggle.SilentModelToggleActivity -a
> > android.intent.action.MAIN -c android.intent.category.LAUNCHER' on
> > device emulator-5554
>
> > Exception Stack Track:
>
> > com.android.ddmlib.ShellCommandUnresponsiveException
> >         at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
> > 408)
> >         at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
> >         at
> > com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAc 
> > ­tion(ActivityLaunchAction.java:
> > 74)
> >         at
> > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchA 
> > ­pp(AndroidLaunchController.java:
> > 1147)
> >         at
> > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleL 
> > ­aunch(AndroidLaunchController.java:
> > 824)
> >         at
> > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.access
> > $3(AndroidLaunchController.java:808)
> >         at 
> > com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController
> > $3.run(AndroidLaunchController.java:656)
>
> > Session Data:
>
> > eclipse.buildId=M20110210-1200
> > java.version=1.6.0_24
> > java.vendor=Apple Inc.
> > BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
> > Framework arguments:  -keyring /Users/ameen/.eclipse_keyring -
> > showlocation
> > Command-line arguments:  -os macosx -ws cocoa -arch x86 -keyring /
> > Users/ameen/.eclipse_keyring -showlocation
>
> > I uploaded the zipped project folder into my DropBox folder if someone
> > iterested to test it:
>
> >http://dl.dropbox.com/u/4392604/Silent_Model_Toggle.zip
>
> > I also explained this bug with screen shots in my blog, if you wanna
> > have a 
> > look:http://enabofaisal.wordpress.com/2011/06/17/the-application-process-h...
>
> > Please someone help me  =)
>
> > BTW .. as shown above (as Session Data) I have intel x86 MAC OS 10.6
> > and using Eclipse of these infos:
> > Eclipse SDK
>
> > Version: 3.6.2
> > Build id: M20110210-1200

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-17 Thread Zsolt Vasvari
Why do you think the error is caused by your code?  The stack trace
you are showing has got something to do with Eclipse, not an Android
application.

On Jun 17, 10:25 pm, aMeeN  wrote:
> I am writing my first Andoid application. And facing an error .. I
> consider it too strange but also expecting to face a lot of strange
> errors and bugs.
>
> I googled to find out what cause that error. And tried to learn how to
> debug Android application on Eclipse but no luck.
>
> The application I am writing is having only an image and button. The
> button is to switch the mobile from normal mode to silent mode and the
> reverse and the image is an indicator the for which mode currently is
> active.
>
> When I got the error I highlighted all the the code and started
> unhighlighting one by one, till I found the this line specifically
> cause the error:
>
> int ringerMode = mAudioManager.getRingerMode();
>
> when I run the application, on the Debug prespective view , in the
> error log tab I am getting :
>
> Error:
>
> No command output when running: 'am start -n
> ameen.android.silentModeToggle/
> ameen.android.silentModeToggle.SilentModelToggleActivity -a
> android.intent.action.MAIN -c android.intent.category.LAUNCHER' on
> device emulator-5554
>
> Exception Stack Track:
>
> com.android.ddmlib.ShellCommandUnresponsiveException
>         at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
> 408)
>         at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
>         at
> com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAc­tion(ActivityLaunchAction.java:
> 74)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchA­pp(AndroidLaunchController.java:
> 1147)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleL­aunch(AndroidLaunchController.java:
> 824)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.access
> $3(AndroidLaunchController.java:808)
>         at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController
> $3.run(AndroidLaunchController.java:656)
>
> Session Data:
>
> eclipse.buildId=M20110210-1200
> java.version=1.6.0_24
> java.vendor=Apple Inc.
> BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
> Framework arguments:  -keyring /Users/ameen/.eclipse_keyring -
> showlocation
> Command-line arguments:  -os macosx -ws cocoa -arch x86 -keyring /
> Users/ameen/.eclipse_keyring -showlocation
>
> I uploaded the zipped project folder into my DropBox folder if someone
> iterested to test it:
>
> http://dl.dropbox.com/u/4392604/Silent_Model_Toggle.zip
>
> I also explained this bug with screen shots in my blog, if you wanna
> have a 
> look:http://enabofaisal.wordpress.com/2011/06/17/the-application-process-h...
>
> Please someone help me  =)
>
> BTW .. as shown above (as Session Data) I have intel x86 MAC OS 10.6
> and using Eclipse of these infos:
> Eclipse SDK
>
> Version: 3.6.2
> Build id: M20110210-1200

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-17 Thread aMeeN
I wasted a week in this bug .. can any help please

On Jun 17, 5:25 pm, aMeeN  wrote:
> I am writing my first Andoid application. And facing an error .. I
> consider it too strange but also expecting to face a lot of strange
> errors and bugs.
>
> I googled to find out what cause that error. And tried to learn how to
> debug Android application on Eclipse but no luck.
>
> The application I am writing is having only an image and button. The
> button is to switch the mobile from normal mode to silent mode and the
> reverse and the image is an indicator the for which mode currently is
> active.
>
> When I got the error I highlighted all the the code and started
> unhighlighting one by one, till I found the this line specifically
> cause the error:
>
> int ringerMode = mAudioManager.getRingerMode();
>
> when I run the application, on the Debug prespective view , in the
> error log tab I am getting :
>
> Error:
>
> No command output when running: 'am start -n
> ameen.android.silentModeToggle/
> ameen.android.silentModeToggle.SilentModelToggleActivity -a
> android.intent.action.MAIN -c android.intent.category.LAUNCHER' on
> device emulator-5554
>
> Exception Stack Track:
>
> com.android.ddmlib.ShellCommandUnresponsiveException
>         at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:
> 408)
>         at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
>         at
> com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAc 
> tion(ActivityLaunchAction.java:
> 74)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchA 
> pp(AndroidLaunchController.java:
> 1147)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleL 
> aunch(AndroidLaunchController.java:
> 824)
>         at
> com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.access
> $3(AndroidLaunchController.java:808)
>         at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController
> $3.run(AndroidLaunchController.java:656)
>
> Session Data:
>
> eclipse.buildId=M20110210-1200
> java.version=1.6.0_24
> java.vendor=Apple Inc.
> BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
> Framework arguments:  -keyring /Users/ameen/.eclipse_keyring -
> showlocation
> Command-line arguments:  -os macosx -ws cocoa -arch x86 -keyring /
> Users/ameen/.eclipse_keyring -showlocation
>
> I uploaded the zipped project folder into my DropBox folder if someone
> iterested to test it:
>
> http://dl.dropbox.com/u/4392604/Silent_Model_Toggle.zip
>
> I also explained this bug with screen shots in my blog, if you wanna
> have a 
> look:http://enabofaisal.wordpress.com/2011/06/17/the-application-process-h...
>
> Please someone help me  =)
>
> BTW .. as shown above (as Session Data) I have intel x86 MAC OS 10.6
> and using Eclipse of these infos:
> Eclipse SDK
>
> Version: 3.6.2
> Build id: M20110210-1200

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en