Android FragmentTabHost : No tab known for tag null
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I used below code and it is not render graphical layout. display error as Exception raised during rendering: No tab known for tag null . how can i solve this ? 回答1: This is the code that I've used to initialise the TabHost and it works fine: import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTabHost; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class DetailFragment extends Fragment { /** * Mandatory empty constructor for the fragment