我正在尝试TabHost在我的应用程序上使用,我只是将它拖到我的活动中使用该设计,但是当我运行它时,它就不会出现,只是得到白色屏幕,有人知道为什么吗?
<TabHost
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tabHost"
android:layout_gravity="center_horizontal">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></TabWidget>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/tab1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"></LinearLayout>
<LinearLayout
android:id="@+id/tab2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"></LinearLayout>
<LinearLayout
android:id="@+id/tab3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"></LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
Run Code Online (Sandbox Code Playgroud)
我刚刚在我的计算机上安装了android Studio(Ubuntu),每次我尝试创建一个新项目时都会遇到这个问题,这个问题不允许我实际启动一个android工作室项目.我在互联网上看到一些解决方案说我应该去配置 - >项目默认值 - >项目结构并在那里进行一些更改,在SDKs字段中,会发生的事情是在项目结构中向我显示的唯一选择是现场SDK位置,我不知道我能做什么,所以我想知道是否有人可以帮助我,谢谢.