iWnn ime在Nexus7 2013 4.4.2上与EditText崩溃

时间:2014-01-31 03:51:19

标签: java android eclipse ime nexus-7

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    </EditText>
</RelativeLayout>

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}}

我有这些日志。
有谁知道任何信息?

01-31 12:30:38.968: W/IInputConnectionWrapper(2193): beginBatchEdit on inactive     InputConnection
01-31 12:30:38.968: W/IInputConnectionWrapper(2193): endBatchEdit on inactive InputConnection
01-31 12:30:38.978: W/IInputConnectionWrapper(2193): beginBatchEdit on inactive InputConnection
01-31 12:30:38.988: W/IInputConnectionWrapper(2193): endBatchEdit on inactive InputConnection
01-31 12:30:39.008: W/IInputConnectionWrapper(2193): beginBatchEdit on inactive InputConnection
01-31 12:30:39.008: W/IInputConnectionWrapper(2193): endBatchEdit on inactive InputConnection
01-31 12:30:39.048: W/IInputConnectionWrapper(2193): beginBatchEdit on inactive InputConnection
01-31 12:30:39.048: W/IInputConnectionWrapper(2193): endBatchEdit on inactive InputConnection
01-31 12:30:39.159: E/iWnn(7491): OpenWnn::onEvent()  InputConnection is not active
01-31 12:30:39.179: E/iWnn(7491): OpenWnn::onEvent()  InputConnection is not active
01-31 12:30:39.179: D/AndroidRuntime(7491): Shutting down VM
01-31 12:30:39.179: W/dalvikvm(7491): threadid=1: thread exiting with uncaught exception (group=0x415a2ba8)
01-31 12:30:39.179: E/AndroidRuntime(7491): FATAL EXCEPTION: main
01-31 12:30:39.179: E/AndroidRuntime(7491): Process: jp.co.omronsoft.iwnnime.ml, PID: 7491
01-31 12:30:39.179: E/AndroidRuntime(7491): java.lang.NullPointerException
01-31 12:30:39.179: E/AndroidRuntime(7491):     at    jp.co.omronsoft.iwnnime.ml.jajp.IWnnImeJaJp.onStartInputView(IWnnImeJaJp.java:930)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at  jp.co.omronsoft.iwnnime.ml.standardcommon.IWnnLanguageSwitcher.onStartInputView(IWnnLanguageSwitcher.java:267)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.inputmethodservice.InputMethodService.showWindowInner(InputMethodService.java:1456)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.inputmethodservice.InputMethodService.showWindow(InputMethodService.java:1414)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.inputmethodservice.InputMethodService$InputMethodImpl.showSoftInput(InputMethodService.java:425)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.inputmethodservice.IInputMethodWrapper.executeMessage(IInputMethodWrapper.java:202)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:40)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.os.Handler.dispatchMessage(Handler.java:102)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.os.Looper.loop(Looper.java:136)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at android.app.ActivityThread.main(ActivityThread.java:5017)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at java.lang.reflect.Method.invokeNative(Native Method)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at java.lang.reflect.Method.invoke(Method.java:515)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
01-31 12:30:39.179: E/AndroidRuntime(7491):     at  dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:1)

当语言设置为日语时,我的Nexus 7遇到了同样的问题。 它似乎是由EditText获得焦点并尝试在准备好之前加载软键盘引起的。 我通过在清单中的Activity定义中设置windowSoftInputMode来阻止键盘在活动开始时加载,从而解决了这个问题。

android:windowSoftInputMode="stateHidden"

此处参考: http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft

我希望这会有所帮助。