Calculator Aplication

Discussion in 'Application Development' started by hellhunt, Jan 28, 2013.

  1. hellhunt

    hellhunt New Member
    5

    Jan 28, 2013
    1
    0
    5
    I'm doing a calculator app that takes two numbers and add, subtracts, multiplicates and divide them. The problem with this application is that when I click a Button (add button, subtract button, multiplication button or divide button) without writing one of the two number first the app crashes.
    How can I resolve this problem?
     

    Advertisement
  2. Frisco

    Frisco =Luceat Lux Vestra=
    VIP Member
    1,323

    Welcome to Android Forums, hh.

    I'm not a developer, but I'm sure a dev will pop in and lend specific assistance, but meantime, does this site have a clue to your issue:

    Introduction to Android development : TouchCalculator - CodeProject

    Come back and let us know how things are going, plus to check with the app developers in here. :)
     
  3. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
    Your prolly get a null pointer exception because you are trying to operate on something that isnt there. Im assuming you are typing the number out, so make sure the text can be converted to a float/double
     

Share This Page

Loading...