问题
I developed an application in android. Its input fields are working fine e.g. username and password inputs (this will call the services and get a xml response) in 2.2, 2.3 but it does not work in 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=""
in error log.
Url is not found
(in catch exception..)
edit
android 4.1 sdk and updated eclipse log cat was printing lot
07-03 11:57:07.826: I/Choreographer(2747): Skipped 44 frames!
The application may be doing too much work on its main thread.
by that I can't easily find error on Log cat.
error was:
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
回答1:
if it is working fine on android 2.2 & 2.3 OSs, then the error may be due to the more strict network policies in android 4.0. Adding the below static block in your activity/communication-class will remove the communication policy related issues in 4.0
static{
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
来源:https://stackoverflow.com/questions/11305388/input-error-in-android