java.lang.RuntimeException: Unable to instantiate activity ComponentInfo {com.example.karsa.infection / com.example.karsa.infection.MainMenu $ Information}: java.lang.InstantiationException: java.lang.Class has no zero pattern constructor at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2361) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2520) at android.app.ActivityThread.-wrap11 (ActivityThread.java) at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1363) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:148) at android.app.ActivityThread.main (ActivityThread .java: 5466) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:726) at com.android.internal.os.ZygoteInit .main (ZygoteInit.java:616) Caused by: java.lang.InstantiationException: java.lang.Class has no zero argument constructor at java.lang.Class.newInstan ce (Native Method) at android.app.Instrumentation.newActivity (Instrumentation.java:1068) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2351) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2520) at android.app.ActivityThread.-wrap11 (ActivityThread.java) at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1363) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os .Looper.loop (Looper.java:148) at android.app.ActivityThread.main (ActivityThread.java:5466) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)

class code:

public class MainMenu extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_menu); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main_menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } public MainMenu(){super();} public void Infor(View v) { Intent intent = new Intent(MainMenu.this, Information.class); startActivity(intent); } public City Cities[]=new City[48]; public int LTInfected[]=new int[10]; public byte orient=0; public boolean GrMed=false; public boolean ReMed=false; public boolean BlMed=false; public boolean WhMed=false; public boolean Win=false; public Player P=new Player(); 

// TODO

 void OnCreate(){ Cities[0]=new City(0,new int[4],"Сан-Франциско",false); Cities[0].ConWith[0]=1; Cities[0].ConWith[1]=12; Cities[0].ConWith[2]=46; Cities[0].ConWith[3]=44; Cities[1]=new City(1,new int[5],"Чикаго",false); Cities[1].ConWith[0]=0; Cities[1].ConWith[1]=12; Cities[1].ConWith[2]=13; Cities[1].ConWith[3]=2; Cities[1].ConWith[4]=3; Cities[2]=new City(2,new int[3],"Атланта",true); Cities[2].ConWith[0]=1; Cities[2].ConWith[1]=17; Cities[2].ConWith[2]=4; Cities[3]=new City(3,new int[3],"Монреаль",false); Cities[3].ConWith[0]=1; Cities[3].ConWith[1]=4; Cities[3].ConWith[2]=5; Cities[4]=new City(4,new int[4],"Вашигтон",false); Cities[4].ConWith[0]=2; Cities[4].ConWith[1]=12; Cities[4].ConWith[2]=3; Cities[4].ConWith[3]=5; Cities[5]=new City(5,new int[4],"Нью-Йорк",false); Cities[5].ConWith[0]=7; Cities[5].ConWith[1]=6; Cities[5].ConWith[2]=3; Cities[5].ConWith[3]=4; Cities[6]=new City(6,new int[4],"Мадрид",false); Cities[6].ConWith[0]=19; Cities[6].ConWith[1]=5; Cities[6].ConWith[2]=7; Cities[6].ConWith[3]=8; Cities[6].ConWith[4]=24; Cities[7]=new City(7,new int[4],"Лондон",false); Cities[7].ConWith[0]=5; Cities[7].ConWith[1]=6; Cities[7].ConWith[2]=8; Cities[7].ConWith[3]=9; Cities[8]=new City(8,new int[5],"Париж",false); Cities[8].ConWith[0]=24; Cities[8].ConWith[1]=6; Cities[8].ConWith[2]=9; Cities[8].ConWith[3]=10; Cities[8].ConWith[4]=7; Cities[9]=new City(9,new int[4],"Эссен",false); Cities[9].ConWith[0]=7; Cities[9].ConWith[1]=8; Cities[9].ConWith[2]=10; Cities[9].ConWith[3]=11; Cities[10]=new City(10,new int[3],"Милан",false); Cities[10].ConWith[0]=9; Cities[10].ConWith[1]=8; Cities[10].ConWith[2]=26; Cities[11]=new City(11,new int[3],"Санкт-Петербург",false); Cities[11].ConWith[0]=9; Cities[11].ConWith[1]=26; Cities[11].ConWith[2]=28; Cities[12]=new City(12,new int[4],"Лос Анджелес",false); Cities[12].ConWith[0]=45; Cities[12].ConWith[1]=13; Cities[12].ConWith[2]=0; Cities[12].ConWith[3]=1; Cities[13]=new City(13,new int[5],"Мехико",false); Cities[13].ConWith[0]=12; Cities[13].ConWith[1]=1; Cities[13].ConWith[2]=17; Cities[13].ConWith[3]=16; Cities[13].ConWith[4]=14; Cities[14]=new City(14,new int[3],"Лима",false); Cities[14].ConWith[0]=15; Cities[14].ConWith[1]=13; Cities[14].ConWith[2]=16; Cities[15]=new City(15,new int[1],"Сантьяго",false); Cities[15].ConWith[0]=14; Cities[16]=new City(16,new int[5],"Богота",false); Cities[16].ConWith[0]=14; Cities[16].ConWith[1]=17; Cities[16].ConWith[2]=13; Cities[16].ConWith[3]=18; Cities[16].ConWith[4]=19; Cities[17]=new City(17,new int[3],"Майами",false); Cities[17].ConWith[0]=2; Cities[17].ConWith[1]=4; Cities[17].ConWith[2]=16; Cities[17].ConWith[3]=13; Cities[18]=new City(18,new int[2],"Буэнос-Айрес",false); Cities[18].ConWith[0]=16; Cities[18].ConWith[1]=19; Cities[19]=new City(19,new int[4],"Сан-Пауло",false); Cities[19].ConWith[0]=18; Cities[19].ConWith[1]=6; Cities[19].ConWith[2]=20; Cities[19].ConWith[3]=16; Cities[20]=new City(20,new int[3],"Лагос",false); Cities[20].ConWith[0]=19; Cities[20].ConWith[1]=21; Cities[20].ConWith[2]=23; Cities[21]=new City(21,new int[3],"Киншаса",false); Cities[21].ConWith[0]=20; Cities[21].ConWith[1]=23; Cities[21].ConWith[2]=22; Cities[22]=new City(22,new int[2],"Йоханнесбург",false); Cities[22].ConWith[0]=21; Cities[22].ConWith[1]=23; Cities[23]=new City(23,new int[4],"Хартум",false); Cities[23].ConWith[0]=25; Cities[23].ConWith[1]=20; Cities[23].ConWith[2]=21; Cities[23].ConWith[3]=22; Cities[24]=new City(24,new int[4],"Алжир",false); Cities[24].ConWith[0]=8; Cities[24].ConWith[1]=6; Cities[24].ConWith[2]=26; Cities[24].ConWith[3]=25; Cities[25]=new City(25,new int[5],"Каир",false); Cities[25].ConWith[0]=26; Cities[25].ConWith[1]=29; Cities[25].ConWith[2]=27; Cities[25].ConWith[3]=23; Cities[25].ConWith[4]=24; Cities[26]=new City(26,new int[6],"Стамбул",false); Cities[26].ConWith[0]=25; Cities[26].ConWith[1]=24; Cities[26].ConWith[2]=10; Cities[26].ConWith[3]=11; Cities[26].ConWith[4]=28; Cities[26].ConWith[5]=17; Cities[27]=new City(27,new int[5],"Багдад",false); Cities[27].ConWith[0]=25; Cities[27].ConWith[1]=26; Cities[27].ConWith[2]=30; Cities[27].ConWith[3]=29; Cities[27].ConWith[4]=31; Cities[28]=new City(28,new int[3],"Москва",false); Cities[28].ConWith[0]=26; Cities[28].ConWith[1]=11; Cities[28].ConWith[2]=30; Cities[29]=new City(29,new int[4],"Эр-Рияд",false); Cities[29].ConWith[0]=25; Cities[29].ConWith[1]=27; Cities[29].ConWith[2]=31; Cities[30]=new City(30,new int[4],"Тегеран",false); Cities[30].ConWith[0]=28; Cities[30].ConWith[1]=27; Cities[30].ConWith[2]=33; Cities[30].ConWith[3]=32; Cities[31]=new City(31,new int[5],"Карачи",false); Cities[31].ConWith[0]=33; Cities[31].ConWith[1]=29; Cities[31].ConWith[2]=32; Cities[31].ConWith[3]=27; Cities[31].ConWith[4]=30; Cities[32]=new City(32,new int[3],"Мумбаи",false); Cities[32].ConWith[0]=31; Cities[32].ConWith[1]=33; Cities[32].ConWith[2]=34; Cities[33]=new City(33,new int[5],"Дели",false); Cities[33].ConWith[0]=30; Cities[33].ConWith[1]=31; Cities[33].ConWith[2]=32; Cities[33].ConWith[3]=34; Cities[33].ConWith[4]=35; Cities[34]=new City(34,new int[5],"Ченнаи",false); Cities[34].ConWith[0]=33; Cities[34].ConWith[1]=35; Cities[34].ConWith[2]=36; Cities[34].ConWith[3]=37; Cities[34].ConWith[4]=21; Cities[35]=new City(35,new int[4],"Калькутта",false); Cities[35].ConWith[0]=33; Cities[35].ConWith[1]=34; Cities[35].ConWith[2]=36; Cities[35].ConWith[3]=40; Cities[36]=new City(36,new int[5],"Бангкок",false); Cities[36].ConWith[0]=34; Cities[36].ConWith[1]=33; Cities[36].ConWith[2]=37; Cities[36].ConWith[3]=40; Cities[36].ConWith[4]=41; Cities[37]=new City(37,new int[4],"Джакарта",false); Cities[37].ConWith[0]=36; Cities[37].ConWith[1]=34; Cities[37].ConWith[2]=41; Cities[37].ConWith[3]=45; Cities[38]=new City(38,new int[2],"Пекин",false); Cities[38].ConWith[0]=42; Cities[38].ConWith[1]=39; Cities[39]=new City(39,new int[5],"Шанхай",false); Cities[39].ConWith[0]=38; Cities[39].ConWith[1]=42; Cities[39].ConWith[2]=46; Cities[39].ConWith[3]=40; Cities[39].ConWith[4]=43; Cities[40]=new City(40,new int[6],"Гонконг",false); Cities[40].ConWith[0]=39; Cities[40].ConWith[1]=43; Cities[40].ConWith[2]=44; Cities[40].ConWith[3]=41; Cities[40].ConWith[4]=36; Cities[40].ConWith[5]=35; Cities[41]=new City(41,new int[4],"Хошимин",false); Cities[41].ConWith[0]=36; Cities[41].ConWith[1]=37; Cities[41].ConWith[2]=40; Cities[41].ConWith[3]=44; Cities[42]=new City(42,new int[3],"Сеул",false); Cities[42].ConWith[0]=38; Cities[42].ConWith[1]=46; Cities[42].ConWith[2]=39; Cities[43]=new City(43,new int[4],"Тайбэй",false); Cities[43].ConWith[0]=39; Cities[43].ConWith[1]=46; Cities[43].ConWith[2]=40; Cities[43].ConWith[3]=44; Cities[44]=new City(44,new int[5],"Манила",false); Cities[44].ConWith[0]=41; Cities[44].ConWith[1]=43; Cities[44].ConWith[2]=40; Cities[44].ConWith[3]=45; Cities[44].ConWith[4]=0; Cities[45]=new City(45,new int[3],"Сидней",false); Cities[45].ConWith[0]=12; Cities[45].ConWith[1]=37; Cities[45].ConWith[2]=44; Cities[46]=new City(46,new int[4],"Токио",false); Cities[46].ConWith[0]=0; Cities[46].ConWith[1]=42; Cities[46].ConWith[2]=39; Cities[46].ConWith[3]=47; Cities[47]=new City(47,new int[2],"Оскака",false); Cities[47].ConWith[0]=46; Cities[47].ConWith[1]=43; } int[][] Infector(int INumber){ int[][] Ret=new int[INumber][2]; for (int p=0;p<INumber;p++){ int gen=InfGen(false); Ret[p][1]=gen; int tp=InfGen(true); Ret[p][tp]=tp; } return Ret; } int InfGen(boolean type){ Random rand = new Random(); if(type){ return rand.nextInt(4); } else { int Inf=rand.nextInt(48); for(int i=0;i<10;i++){ if(Inf==LTInfected[i]){ Inf=InfGen(false); } } LTInfected[orient]=Inf; if(orient==9){ orient=0; } else { orient++; } return Inf; } } class Player { int Position; int FinPoints; int RExp; int GExp; int BExp; int WExp; public Player(){} void onCreate(){ this.Position=2; this.FinPoints=0; this.RExp=0; this.GExp=0; this.BExp=0; this.WExp=0; } void DoMed(int type){ switch (type) { case 0: this.RExp-=10; ReMed=true; break; case 1: this.GExp-=10; GrMed=true; break; case 2: this.BExp-=10; BlMed=true; break; case 3: this.WExp-=10; WhMed=true; break; } if(ReMed&GrMed&BlMed&WhMed) Win=true; } void GetExp(int type){ this.FinPoints-=2; switch (type){ case 0: Cities[Position].Red--; this.RExp+=1; break; case 1: Cities[Position].Green--; this.GExp+=1; break; case 2: Cities[Position].Blue--; this.BExp+=1; break; case 3: Cities[Position].White--; this.WExp+=1; break; } } void stat(){ this.FinPoints-=3; Cities[this.Position].BStation(); } void ChPos(int nPosition){ boolean check=false; for(int i=0;i<Cities[Position].ConWith.length;i++){ if (nPosition==Cities[Position].ConWith[i]) { check=true; this.Position=nPosition; } } if (check==false){ this.FinPoints-=3; this.Position=nPosition; } } } class City { int Red; int Green; int Blue; int White; int id; int ConWith[]; String Name; boolean Station; public City(){} public City(int id,int ConWith[], String Name,boolean Station) { this.id=id; this.Red=0; this.Green=0; this.Blue=0; this.White=0; this.ConWith=ConWith; this.Name=Name; this.Station=Station; } public void Cure(int type) { switch (type) { case 0: if(ReMed==false){ P.FinPoints++; this.Red -= 1; } else{ P.FinPoints+=this.Red; this.Red=0; } break; case 1: if(GrMed==false){ P.FinPoints++; this.Green -= 1; } else{ P.FinPoints+=this.Green; this.Green=0; } break; case 2: if(BlMed==false){ P.FinPoints++; this.Blue -= 1; } else{ P.FinPoints+=this.Blue; this.Blue=0; } break; case 3: if(WhMed==false){ P.FinPoints++; this.White -= 1; } else{ P.FinPoints+=this.White; this.White=0; } break; } } public void CureAll(int type) { switch(type){ case 0: P.FinPoints+=this.Red; this.Red=0; break; case 1: P.FinPoints+=this.Green; this.Green=0; break; case 2: P.FinPoints+=this.Blue; this.Blue=0; break; case 3: P.FinPoints+=this.White; this.White=0; break; } } public void BStation() { this.Station=true; } } public class Information extends Activity { public Information(){super();} @Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.activity_information); TextView textView = (TextView)findViewById(R.id.textView); textView.setText( "Алжир: R-"+Cities[24].Red+"; G-"+Cities[24].Green+"; B-"+Cities[24].Blue+"; W-"+Cities[24].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Багдад: R-"+Cities[28].Red+"; G-"+Cities[28].Green+"; B-"+Cities[28].Blue+"; W-"+Cities[28].White+"\n"+ "Бангкок: R-"+Cities[36].Red+"; G-"+Cities[36].Green+"; B-"+Cities[36].Blue+"; W-"+Cities[36].White+"\n"+ "Богота: R-"+Cities[16].Red+"; G-"+Cities[16].Green+"; B-"+Cities[16].Blue+"; W-"+Cities[16].White+"\n"+ "Буэнос-Айрес: R-"+Cities[18].Red+"; G-"+Cities[18].Green+"; B-"+Cities[18].Blue+"; W-"+Cities[18].White+"\n"+ "Вашингтон: R-"+Cities[4].Red+"; G-"+Cities[4].Green+"; B-"+Cities[4].Blue+"; W-"+Cities[4].White+"\n"+ "Гонконг: R-"+Cities[40].Red+"; G-"+Cities[40].Green+"; B-"+Cities[40].Blue+"; W-"+Cities[40].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"+ "Атланта: R-"+Cities[2].Red+"; G-"+Cities[2].Green+"; B-"+Cities[2].Blue+"; W-"+Cities[2].White+"\n"); } } } 
  • one
    Add clarity to the question. Where exactly does not work, what a mistake. - Denis Bubnov
  • The very first "code" is a mistake - Ryuga
  • 2
    The question should contain a minimal reproducible example . Now this is more like a test of remote debugging abilities. - Dmitriy Simushev
  • from the above code is not very visible (there is a lot of code, and the formatting has floated), but it seems that your Information class is an inner ( MainActivity ) class of the MainActivity . For internal classes, the compiler complements all constructors with an argument to which an instance of the top-level class is passed during creation, so Information no constructor without parameters, and the framework cannot create an instance of it. You must either make Information a top-level class (in a separate file), or declare static . In doing so, you will have a problem with the transfer of the state ( Cities ), but this is another question. - zRrr
  • When tell me how to get information, it is for this reason that it is listed as an internal class - Ryuga

1 answer 1

The answer in the error message is not in the super class of the constructor with zero parameters, but it is called in the constructor of the above activation class. You just need to remove the constructor in the activit. In the activation it is not needed at all.