Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么编辑文本没有在android中显示?_Android_Xml_Android Edittext - Fatal编程技术网

为什么编辑文本没有在android中显示?

为什么编辑文本没有在android中显示?,android,xml,android-edittext,Android,Xml,Android Edittext,我对安卓完全陌生。EditText未显示在图形布局中 xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orien

我对安卓完全陌生。EditText未显示在图形布局中

xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <EditText 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:inputType="text"
        android:ems="10"
        />

</LinearLayout>

“”后面还有一条黄色下划线。当我把鼠标光标放在上面时,它什么也没说。我找不到我想要的答案。图形布局看起来不如原始布局明亮,如下所示:


不,我还没有运行这个程序。Plz.

解决方案从下面的链接,这个问题发生在API 20(Android 4.4 W)上,我最近遇到了一个问题,但问题将通过将Android版本更改为用于渲染级别的API 20(Android 4.4 W)到API 19(Android 4.4.2)(图形布局右上角的Android图标)来解决或者将您的SDK更新为Android L(API 20 L预览版)


Ref:

您是否遵循异常消息并检查错误日志?另外,您将API目标设置为20,这是故意的吗?这是Eclipse还是Android Studio?是否在项目中创建了其他文件?例如,其他有问题的布局、片段或活动会导致此错误。我所做的只是在谷歌上搜索错误的确切行,猜猜我发现了什么。在此之前,请考虑查找问题。它可以节省您和其他人的时间。如果您不添加任何内容,则无需复制答案。只需将flag作为Dupe添加为flag Dupe。。谢谢