I was making an app with the help of a tutorial on youtube and i got an error.I have only made the UI till now. This is the complete error:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.covidtracker/com.example.covidtracker.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.covidtracker.MainActivity"
This is my code :
public class MainActivity extends AppCompatActivity {
private TextView totalconfirm,totalactive,totalrecoverd,totaldeath,test;
private TextView todayconfirm,todayrecovered,todaydeath;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
init();
}
private void init(){
totalconfirm = findViewById(R.id.totalconfirm);
totalrecoverd = findViewById(R.id.totalrecovered);
todaydeath = findViewById(R.id.totaldeath);
totalactive = findViewById(R.id.totalactive);
todaydeath = findViewById(R.id.todaydeath);
todayconfirm = findViewById(R.id.todayconfirm);
todayrecovered = findViewById(R.id.todayrecovered);
test = findViewById(R.id.test);
}
}