• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Gradeaverage app will not start in emulator!

dlol

Lurker
Im trying to make this app that calculates your grade average (based on the Swedish grade system) and I have made the graphical layout and written the java code in eclipse that I think is right, but when I try to launch it in the emulator it won
 
Please put your code in CODE tags. It is extremely difficult to read in this form.

When you say "it won't start" what exactly do you mean? Is it throwing an exception on start up? Is it simply starting, then immediately returning to the homescreen? What?
 
You're doing all the average calculation too early in the activity lifecycle.

As your code currently stands, when the activity is created your getting the text in the EditTexts and calculating the average, even before the user has had a chance to enter anything into the EditTexts.

You need to move the code from gtext = editText1.getText().toString(); to str = "Ditt snitt
 
Back
Top Bottom