我在 Android Studio 中创建了一个 AVD,但是当我转到布局->activity_main.xml
时它没有显示。错误信息如下所示。
Failed to create Context 0x3005
could not get wglGetExtensionsStringARB
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
emulator: emulator window was out of view and was recentered
Could not initialize emulated framebuffer
activity_main.xml
下有两个文件:activity_main.xml
和activity_main.xml
(land)。在右侧的组件树和属性空间下,它显示“nothing to show”。
当我尝试渲染它时,它显示此错误消息:
渲染问题在渲染过程中引发异常:action_bar
xml 文件如下所示:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
<TextView android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
有什么想法吗?
最佳答案
哦,我想出了问题。在 IDE 中渲染布局时,我将 Android 版本更改为用户,从最佳选择到版本 21,它位于显示框上方的 AppTheme 和 MainActivity 旁边。
关于android - 创建的 Android 虚拟设备不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29024321/