【发布时间】:2015-08-04 08:36:43
【问题描述】:
我刚刚从 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 System Image 我已经安装了
【问题讨论】:
-
我已经这样做了,但我得到了同样的错误
-
我遇到了同样的问题,但我没有任何解决方案,所以我再次转向 eclipse
-
渲染问题不同,AVD配置错误不同。当您在 UI xml 中使用预编译库时会出现渲染问题,这确实很烦人但不是错误。如果您的 AVD 遇到问题,您可以使用 GenyMotion,它免费供个人使用,与内置 AVD 相比速度非常快。
-
您的 xml 很好,但您需要更改主题或 API 级别,如下面的@AmritPalSingh 建议的那样。
-
@Gaurav 请查看此答案并检查它是否解决了您的问题stackoverflow.com/a/10101698/1979347。另外,我建议您使用更好且速度更快的 GenyMotion。