我在Android Studio中创建了一个AVD但是当我进入layout-> 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
(土地)。在右侧的“组件树”和“属性”空间下,它显示"无需显示"。
当我尝试渲染它时,它会显示以下错误消息:
渲染问题渲染期间引发的异常: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>
有什么想法吗?
答案 0 :(得分:6)
哦,我想出了问题。我将 Android版本更新为用户时,将IDE中的布局从最佳选择更改为版本21,该版本位于显示框上方的AppTheme和MainActivity旁边。