2015-05-22 58 views
1

我刚刚从Eclipse中切换到Android Studio,但现在我得到的问题我不能够TI运行,当我乳宁它我得到的错误我的应用程序:无法在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 

为什么我得到这个错误我们如何解决这个问题。所以我可以运行我的应用程序。 MINSDK

我已经做了所有这些变化,但我面临着同样的问题,也是作为XML的设计部分是不可见的,我 DESIGN SECTION

因此,这些都是我面临的请帮我解决这个问题这 我的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我已经安装了 enter image description here

+0

我这样做还是我得到了同样的错误 – Developer

+1

我面临着同样的问题,但我还没有得到任何解决方案,所以我再次移动到eclipse –

+0

渲染的问题是不同的和AVD配置错误不同。当您在UI xml中使用预编译库时,会出现呈现问题,这非常烦人,但不是bug。如果您在使用AVD时遇到问题,可以使用GenyMotion,与内置AVD相比,该产品可以免费供个人使用,并且速度非常快。 –

回答

2

对于设计 XML部分切换你的API级别从到API (在你的XML文件的顶部是由小机器人图标改变),

OR

转至res/value/styles.xml并更改您的AppTheme from

Theme.AppCompat.Light.DarkActionBar

Base.Theme.AppCompat.Light.DarkActionBar

See Reference Link here for design rendering exception.

对于您最初的模拟器错误

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

请参阅此链接 -

1 - Reference link1

2 - Reference link2

+1

这是问题谢谢 – Developer

+1

如果这个答案解决了你的问题,那么请标记为正确。 –

+1

很高兴我帮你:) –

相关问题