Kst*_*tar 3 android android-layout
我在android中开发了一个应用程序.它的输入字段工作正常,例如用户名和密码输入(这将调用服务并获得xml响应)在2.2,2.3中但它在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=""
Run Code Online (Sandbox Code Playgroud)
在错误日志中.
Url is not found
Run Code Online (Sandbox Code Playgroud)
(在捕获例外..)
编辑
android 4.1 sdk和更新的eclipse日志猫正在打印很多
07-03 11:57:07.826: I/Choreographer(2747): Skipped 44 frames!
The application may be doing too much work on its main thread.
Run Code Online (Sandbox Code Playgroud)
通过我,我不能轻易找到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
Run Code Online (Sandbox Code Playgroud)
如果它在Android 2.2和2.3操作系统上正常工作,那么错误可能是由于android 4.0中更严格的网络策略.在您的activity/communication-class中添加以下静态块将删除4.0中与通信策略相关的问题
static{
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5764 次 |
| 最近记录: |