• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

It doesn't provide me expected output

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is my main.xml file


this is string.xml



below is screenshot of my project
project.jpg
[Thumbnail for project.jpg]
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is the output i am getting.but i am expecting a screen with some buttons.where is the error?
output.jpg
[Thumbnail for output.jpg]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's the emulator home screen; how are you trying to run the application? What's in the logcat output while you do that?
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I remember getting goofed up with this.
Notice the "Lock" icon. You need to drag it to the right hand side to "unlock" the phone. If coded correctly, you will see your app there
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I select Sudoko java file & select Run from drop down.
below are the screenshots.
SelectSudoku.jpg
[Thumbnail for SelectSudoku.jpg]
Run.jpg
[Thumbnail for Run.jpg]
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is the consol output
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Maneesh " what do you mean lock icon ?
can you explain ?
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The android emulator screenshot you provided. At the bottom you can see two icons. One is the "lock". The second is the "volume". Slide the lock icon to the right using your mouse to unlock the phone
 
Ranch Hand
Posts: 633
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Maneesh told drag it to the right hand side to "unlock" the phone. After unlocking phone you can see the output. Or you can press Menu button to unlock the phone.

And what you had posted is not Logcat output it is consol output. To see console output click on DDMS which is located at top right of eclipse.
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks all .it is working now.Anyway what is logcat ?

I have attached a screenshot.can you show me where to click?
logcat.jpg
[Thumbnail for logcat.jpg]
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Window->Show View->Other->Android->LogCat
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i run the project again.but logcat doesn't show anything ?
ok.jpg
[Thumbnail for ok.jpg]
no.jpg
[Thumbnail for no.jpg]
 
Pramod P Deore
Ranch Hand
Posts: 633
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. Do one thing on the top right side of eclipse there is icon of "open perspective" (to the just left of Java) Click on that. Then select DDMS. Then If device contain your emulator name then click on that (just one click) If focus come on that then again look at Logcat you will get Logcat output.

To go to the .java files then click on Java (again top right of eclipse )
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya,i got it.anyway what can we get from these thisng
 
Pramod P Deore
Ranch Hand
Posts: 633
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At last you got it

Using logcat output you can trace flow of your application by inserting System.out.println (""); statement.

Try inserting some statement in onCreate () method and in some other method. so you know that first onCreate statement execute first when you run your application. You can also use it for checking variables value at runtime.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic