纠结半天,改了许多方式,最后发现问题在于,
要加载的activity在创建的时候通过android studio的代码补全,误将 onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {} 方法 当作onCreate(Bundle savedInstanceState) 方法
只要删掉第二个参数就可以了
纠结半天,改了许多方式,最后发现问题在于,
要加载的activity在创建的时候通过android studio的代码补全,误将 onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {} 方法 当作onCreate(Bundle savedInstanceState) 方法
只要删掉第二个参数就可以了