java - Android simulator cant run app -


im making simple app youtube views , stuff whenever run app no errors app doesn't open , on simulator says "cfbc (the name of app) has stopped running" here code have 6 activities know lot if can tell me why crashing 0 errors ton

package org.cfbcla.cfbc;      import android.content.intent;  import android.os.bundle;  import android.support.v7.app.appcompatactivity;  import android.view.view;  import android.widget.button;    import com.google.android.youtube.player.youtubeinitializationresult;  import com.google.android.youtube.player.youtubeplayer;  import com.google.android.youtube.player.youtubeplayerview;    import java.util.arraylist;  import java.util.list;      /**   * created kwia on 8/4/17.   */    public class display extends appcompatactivity {      youtubeplayerview myoutubeplayerview;      button btnplay;      youtubeplayer.oninitializedlistener moninitializedlistener;            @override      public void onbackpressed() {    }        @override      protected void oncreate(bundle savedinstancestate) {          super.oncreate(savedinstancestate);          setcontentview(r.layout.display);          btnplay = (button) findviewbyid(r.id.btnplay);          myoutubeplayerview = (youtubeplayerview) findviewbyid(r.id.youtubeplay);            moninitializedlistener = new youtubeplayer.oninitializedlistener() {              @override              public void oninitializationsuccess(youtubeplayer.provider provider, youtubeplayer youtubeplayer, boolean b) {                  list<string> videolist = new arraylist<>();                  videolist.add("qowe0xqei_m");                  videolist.add("5stxwesdbb0");                  youtubeplayer.loadvideos(videolist);                    }                @override              public void oninitializationfailure(youtubeplayer.provider provider, youtubeinitializationresult youtubeinitializationresult) {                }          };          btnplay.setonclicklistener(new view.onclicklistener() {              @override              public void onclick(view view) {                  myoutubeplayerview.initialize(ytconfig.getapikey(), moninitializedlistener);                }          });            }          public void onbuttonclick4(view v4) {          if (v4.getid() == r.id.button3) {              intent i4 = new intent(display.this, mainactivity.class);              startactivity(i4);          }      }  }

package org.cfbcla.cfbc;    import android.app.activity;  import android.content.intent;  import android.os.bundle;  import android.view.view;    /**   * created kwia on 8/4/17.   */    public class display2 extends activity{        @override      protected void oncreate(bundle savedinstancestate) {          super.oncreate(savedinstancestate);          setcontentview(r.layout.display2);      }      public void onbuttonclick4(view v4) {          if (v4.getid() == r.id.button) {              intent i4 = new intent(display2.this, mainactivity.class);              startactivity(i4);          }      }  }

package org.cfbcla.cfbc;    import android.content.intent;  import android.os.bundle;  import android.support.v7.app.appcompatactivity;  import android.view.view;  import android.widget.button;    import com.google.android.youtube.player.youtubeinitializationresult;  import com.google.android.youtube.player.youtubeplayer;  import com.google.android.youtube.player.youtubeplayerview;      /**   * created kwia on 8/4/17.   */    public class display3 extends appcompatactivity{      youtubeplayerview myoutubeplayerview;      button btnplay;      youtubeplayer.oninitializedlistener moninitializedlistener;        @override      protected void oncreate(bundle savedinstancestate) {          super.oncreate(savedinstancestate);          setcontentview(r.layout.display3);          btnplay = (button) findviewbyid(r.id.btnplay);          myoutubeplayerview = (youtubeplayerview) findviewbyid(r.id.youtubeplay);            moninitializedlistener = new youtubeplayer.oninitializedlistener() {              @override              public void oninitializationsuccess(youtubeplayer.provider provider, youtubeplayer youtubeplayer, boolean b) {                  youtubeplayer.loadvideo("sfxq1vaakxa");                    }                @override              public void oninitializationfailure(youtubeplayer.provider provider, youtubeinitializationresult youtubeinitializationresult) {                }          };          btnplay.setonclicklistener(new view.onclicklistener() {              @override              public void onclick(view view) {                  myoutubeplayerview.initialize(ytconfig.getapikey(), moninitializedlistener);                }          });            }      public void onbuttonclick4(view v4) {          if (v4.getid() == r.id.button) {              intent i4 = new intent(display3.this, mainactivity.class);              startactivity(i4);          }      }  }

package org.cfbcla.cfbc;    import android.app.activity;  import android.content.intent;  import android.os.bundle;  import android.view.view;    /**   * created kwia on 8/4/17.   */    public class display4 extends activity{        @override      protected void oncreate(bundle savedinstancestate) {          super.oncreate(savedinstancestate);          setcontentview(r.layout.display4);      }      public void onbuttonclick4(view v4) {          if (v4.getid() == r.id.button4) {              intent i4 = new intent(display4.this, mainactivity.class);              startactivity(i4);          }      }  }

package org.cfbcla.cfbc;    import android.app.activity;  import android.content.intent;  import android.os.bundle;  import android.view.view;    public class mainactivity extends activity {        @override      protected void oncreate(bundle savedinstancestate) {          super.oncreate(savedinstancestate);          setcontentview(r.layout.activity_main);        }        public void onbuttonclick(view v) {          if (v.getid() == r.id.a) {              intent = new intent(mainactivity.this, display.class);              startactivity(i);          }        }        public void onbuttonclick2(view v2) {          if (v2.getid() == r.id.c) {              intent i2 = new intent(mainactivity.this, display2.class);              startactivity(i2);          }      }      public void onbuttonclick3(view v3) {          if (v3.getid() == r.id.s) {              intent i3 = new intent(mainactivity.this, display3.class);              startactivity(i3);          }      }      public void onbuttonclick4(view v4) {          if (v4.getid() == r.id.m) {              intent i4 = new intent(mainactivity.this, display4.class);              startactivity(i4);          }      }    }


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -