-2

MainActivty.java file which allows user to input data into fields, and then they hit 1 button "calculate" and it manipulates all the data and displays it on the Results.java page. (the NEXT button at top was a test to see if I could even load the Results page, which no, clicking the NEXT button just crashes the app, and the calculate button is not even clickable)

MainActivity.java

MainActivity.java continued

Does anyone have any idea why my calculate button is not working on my app? I am only allowed to post 2 links so if you need another picture let me know.

  • 1
    Please don't post screenshots of code, XML, or logcat output. Please post all text as text, in the question itself. Include the [stack trace](http://stackoverflow.com/questions/23353173) from the crash, as well. – Mike M. Apr 28 '17 at 03:08

1 Answers1

0

your onButtonCalculate() doesn't call add

android:onClick="onButtonCalculate"

In your XML code

Harsh Singhal
  • 567
  • 4
  • 12
  • I had that but had tools:onClick="onButtonCalculate" ops. changed that but now I'm getting this error: Error while executing: am start -n "tigerterrors.sprint2app/tigerterrors.sprint2app.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=tigerterrors.sprint2app/.MainActivity } – John Rogers Apr 28 '17 at 03:29
  • Here is a picture of my error and my Manifest https://i.gyazo.com/363ac243d7163c536128aea7239a07a8.png – John Rogers Apr 28 '17 at 03:35
  • any idea as to why I keep getting this error? @Harsh Singhal – John Rogers Apr 28 '17 at 04:26