android - ) expected or missing -
@targetapi(build.version_codes.lollipop) public class homeactivity extends activity { private static final string tag = homeactivity.class.getsimplename(); private imagebutton imagebutton; private imagebutton imagebutton2; public imagebutton imagebutton4; public imagebutton imagebutton5; private imageview imageview; private imageview imageview2; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_home); imagebutton = (imagebutton) findviewbyid(r.id.imagebutton); imagebutton2 = (imagebutton) findviewbyid(r.id.imagebutton2); imagebutton4 = (imagebutton) findviewbyid(r.id.imagebutton4); imagebutton5 = (imagebutton) findviewbyid(r.id.imagebutton5); imageview = (imageview) findviewbyid(r.id.imageview); imageview2 = (imageview) findviewbyid(r.id.imageview2); //single player button click event imagebutton4.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent = new intent(getapplicationcontext(), mainactivity.class); startactivity(i); finish(); };}, //multi player game button event imagebutton5.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent = new intent(getapplicationcontext(), multiplayer.class); startactivity(i); finish(); };}), //settings button event imagebutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent = new intent(getapplicationcontext(), musicactivity.class); startactivity(i); finish(); } }); }}
there problem in code in ')' missing somewhere. cursor shows missing component in setting button event. not build because of error.there missing of ')' terminates compiler , failed build.
you never closing first onclicklistener @ imagebutton4
imagebutton4.setonclicklistener**(**new view.onclicklistener() { @override public void onclick(view v) { intent = new intent(getapplicationcontext(), mainactivity.class); startactivity(i); finish(); };},
the end row should this
}}),
but not getting sense of these kommas behind there
Comments
Post a Comment