【问题标题】:Input Error in android安卓输入错误
【发布时间】:2012-07-03 19:59:00
【问题描述】:

我在 android 中开发了一个应用程序。它的输入字段工作正常,例如2.2、2.3 中的用户名和密码输入(这将调用服务并获得 xml 响应),但在 4.0、4.1 中不起作用。

xml

EditText
            android:id="@+id/email"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="4"
            android:imeOptions="actionNext"
            android:singleLine="true"
            android:text="" 

在错误日志中。

  Url is not found

(在捕获异常中..)

编辑

android 4.1 sdk 和更新的 eclipse log cat 正在打印很多

07-03 11:57:07.826: I/Choreographer(2747): Skipped 44 frames! 
The application may be doing too much work on its main thread.

因此我无法轻易在 Log cat 上找到错误。

错误是:

07-03 11:58:25.927: E/ActivityThread(555): Failed to find provider info
for com.android.inputmethod.latin.dictionarypack 07-03 11:58:25.947:
E/BinaryDictionaryGetter(555): Could not find a dictionary pack

【问题讨论】:

  • 粘贴异常堆栈跟踪
  • 好的,我会接受答案,但是在 android 4.1 sdk 和更新的 eclipse 日志中 cat 正在打印很多(如 07-03 11:57:07.826: I/Choreographer(2747): Skipped 44 frames !该应用程序可能在其主线程上做了太多工作。)..我无法轻易在 Log cat 上找到错误。
  • 错误是:07-03 11:58:25.927:E/ActivityThread(555):无法找到 com.android.inputmethod.latin.dictionarypack 07-03 11:58 的提供者信息: 25.947: E/BinaryDictionaryGetter(555): 找不到字典包

标签: android android-layout


【解决方案1】:

如果它在 android 2.2 和 2.3 操作系统上运行良好,那么该错误可能是由于 android 4.0 中更严格的网络策略造成的。在您的活动/通信类中添加以下静态块将删除 4.0 中与通信策略相关的问题

static{
    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();

    StrictMode.setThreadPolicy(policy);
}

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-02-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多