我在三星Galaxy S II(GT-I9100G)&三星NTT DOCOMO Galaxy S II LTE(SC-03D)上看到此。ArrayIndexOutOfBoundsException當調用Dialog.show()
我正在針對10級(最低等級3)構建等級14。
我認爲這是與主題有關,但不知道從哪裏開始。我很確定這不會發生在所有的Galaxy SII上,否則我會得到更多的報告。
或者,也許活動已被銷燬此代碼被調用 - 會導致它?
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setIcon(R.drawable.app_icon);
builder.setTitle("my title");
builder.setMessage("my message which has about 7 lines and each line is short");
builder.setPositiveButton(R.string.ok, null);
builder.show();
日誌貓:
java.lang.ArrayIndexOutOfBoundsException: null
at android.content.res.TypedArray.getInt(TypedArray.java:248)
at android.widget.ScrollView.<init>(ScrollView.java:173)
at android.widget.ScrollView.<init>(ScrollView.java:161)
at java.lang.reflect.Constructor.constructNative(Constructor.java:-2)
at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
at android.view.LayoutInflater.createView(LayoutInflater.java:505)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:215)
at com.android.internal.app.AlertController.installContent(AlertController.java:215)
at android.app.AlertDialog.onCreate(AlertDialog.java:251)
at android.app.Dialog.dispatchOnCreate(Dialog.java:307)
at android.app.Dialog.show(Dialog.java:225)
at android.app.AlertDialog$Builder.show(AlertDialog.java:823)
顯示您的完整代碼 – waqaslam 2012-03-18 01:41:38
您想查看更多內容嗎?所有代碼都在那裏,從Activity.onCreate() – 2012-03-18 02:35:23
調用它可以在模擬器或其他設備上正常運行嗎? – waqaslam 2012-03-18 02:36:50