无法在Android Studio中运行应用程序

无法在Android Studio中运行应用程序,android,android-studio,Android,Android Studio,我刚从Eclipse切换到Android Studio,但现在我遇到了一个问题,我无法运行我的应用程序,当我运行它时,我遇到了错误: C:\Users\ga\AppData\Local\Android\sdk1\tools\emulator.exe -avd Nexus_5_API_21_x86 -netspeed full -netdelay none emulator: ERROR: This AVD's configuration is missing a kernel file!! em

我刚从Eclipse切换到Android Studio,但现在我遇到了一个问题,我无法运行我的应用程序,当我运行它时,我遇到了错误:

C:\Users\ga\AppData\Local\Android\sdk1\tools\emulator.exe -avd Nexus_5_API_21_x86 -netspeed full -netdelay none
emulator: ERROR: This AVD's configuration is missing a kernel file!!
emulator: ERROR: ANDROID_SDK_ROOT is undefined
为什么我会出现这个错误?我们如何解决这个问题?这样我就可以运行我的应用程序了。

我已经做了所有这些更改,但我面临着同样的问题,因为xml的设计部分对我来说是不可见的

这就是我面临的问题,请帮我解决这个问题 我的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=".HomePage">

    <TextView
        android:text="@string/hello_world"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</RelativeLayout>

有关ARM EABI v7a系统映像,请参阅,我已经安装了该映像
对于设计xml部分,将API级别从22切换到API21(将其从xml文件顶部的小android图标更改)

转到res/value/styles.xml并从

Theme.AppCompat.Light.darkaActionBar

Base.Theme.AppCompat.Light.darkaActionBar

对于您的初始仿真程序错误

C:\Users\ga\AppData\Local\Android\sdk1\tools\emulator.exe-avd Nexus\u 5\u API\u 21\u x86-netspeed full-netdelay无
emulator:错误:此AVD的配置缺少内核文件!!
emulator:错误:ANDROID\u SDK\u根未定义

请参阅此链接-

1-


2-

我已经这样做了,但我还是遇到了同样的错误。我遇到了同样的问题,但我还没有找到任何解决方案,所以我再次转到了eclipseRendering问题,即不同的AVD配置错误。当您在UI xml中使用预编译库时,会出现呈现问题,这很烦人,但不是一个bug。如果您的AVD存在问题,您可以使用GenyMotion,它可以免费供个人使用,与内置AVD相比速度非常快。您的xml很好,但您需要更改主题或API级别,如下面@Amritpalingh所建议的那样。@Gaurav请查看此答案并检查它是否解决了您的问题。也,我建议你使用GenyMotion,它更好更快。这就是问题所在。谢谢如果这个答案解决了你的问题,请将它标记为正确。很高兴我帮助了你:)@amritpalling我在发布之前检查了这两个链接,但这对我没有帮助,现在我正在尝试使用GenyMotion。com@Gaurav-我没有面对过这些若我得到任何解决方案,问题将更新我的答案。