3

私はアンドロイドでアプリケーションを開発しました。その入力フィールドは正常に機能しています。たとえば、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

(キャッチ例外で..)

編集

android4.1sdkと更新された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.

それによって、私はLogcatでエラーを簡単に見つけることができません。

エラーは次のとおりです。

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
4

1 に答える 1

5

android2.2および2.3OSで正常に動作している場合、エラーはandroid4.0のより厳格なネットワークポリシーが原因である可能性があります。以下の静的ブロックをアクティビティ/通信クラスに追加すると、4.0の通信ポリシー関連の問題が削除されます

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

    StrictMode.setThreadPolicy(policy);
}
于 2012-07-03T06:25:44.263 に答える