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

App Inventor App crushing, 2 layouts

avichay

Newbie
i dont very well English speak... i'll try to write it the best i could so.
In my app I trying to move betwine 2 layouts but when i pressing the button 'the app crushing.
I'm a bigginer so I dont realy get the error, so here it is:
FATAL EXCEPTION: main
Process: com.avichay.askmiku, PID: 12312
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.avichay.askmiku/com.avichay.askmiku.enMiku}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

but I cant solve my problrm no metter what i do

sooo plese help me

main Java code:
https://gist.github.com/anonymous/90090dc6a1c6ba6ac7187fb0f669980b

main xml code:
https://gist.github.com/anonymous/c3b242cfdd7e69dda61f7e1fc427429e

seccound Java code:
https://gist.github.com/anonymous/2d385f644a9d0c9ded06fd3744ad3498

seccound XML code:
https://gist.github.com/anonymous/c2eadd232a344c3b51645c261953d4fe

THX for helpers!
 
variable buttonEn is null

Code:
Button buttonEn =(Button)findViewById(R.id.bottom);

You've probably not defined the button with id R.id.bottom in the XML for view activity_en_miku.
 
variable buttonEn is null

Code:
Button buttonEn =(Button)findViewById(R.id.bottom);

You've probably not defined the button with id R.id.bottom in the XML for view activity_en_miku.
in the main layout or the second?
 
variable buttonEn is null

Code:
Button buttonEn =(Button)findViewById(R.id.bottom);

You've probably not defined the button with id R.id.bottom in the XML for view activity_en_miku.
soory i so dumb i speled button dont right. :(
 
Back
Top Bottom