Could not execute method of the activity Android

导致此问题的原因有,

一:未注册

如果是 ActivityNotFoundException 的,那说明没在 Manifest.xml 的 application 标签下注册 activity。

 

二:次序不对

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_testarray);

放在 onCreate 最前面。
原文地址:https://www.cnblogs.com/luminji/p/4581332.html