Logcat:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com..*.MainActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.*.MyMapFragment
method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiatemethod failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiatemethod failed; nested exception is org.springframework.beans.B
我想知道是否可以使用fragment名称来启动variable,而不是硬编码fragments名称。这是传统上启动片段的方式:ft.replace(R.id.your_placehodler, new YourFragment());但是,假设您试图启动fragment,而不知道它的名称,也可能不知道它是哪个fragment。就像一个listFragment,或者一个Listview,您正在运行一个array o