【问题标题】:Why is the EditText not showing in android? [duplicate]为什么 EditText 没有在 android 中显示? [复制]
【发布时间】:2014-07-31 16:31:48
【问题描述】:

我对 android 完全陌生。 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>

''后面还有一点黄色下划线。当我将鼠标光标放在它上面时,它什么也没说。我找不到我正在寻找的答案。图形布局看起来没有原来的那么亮,如下所示:

不,我还没有运行程序。请。

【问题讨论】:

  • 您是否按照异常消息并检查错误日志?另外,您将 API 目标设置为 20,这是故意的吗?
  • 这是 Eclipse 还是 Android Studio?您在项目中创建了任何其他文件吗?例如,其他有问题的布局、片段或活动会引发此错误。
  • 我所做的只是用谷歌搜索了错误的确切行,猜猜我发现了这个 stackoverflow.com/questions/24451490/… 。请考虑在此处发布之前搜索问题。它可以节省您和其他人的时间。

标签: android xml android-edittext


【解决方案1】:

来自以下链接的解决方案,这个问题发生在 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 预览版)

参考:Exception raised during rendering: java.lang.System.arraycopy

【讨论】:

  • 如果您不向其中添加任何内容,则无需复制答案。只是标记为骗子
  • 我将它添加为标志 Dupe.. 谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-22
  • 1970-01-01
  • 1970-01-01
  • 2021-04-04
  • 2016-06-28
  • 2018-12-19
相关资源
最近更新 更多