Android: Android.view.inflateexception: Binary Xml File Line #13: Error Inflating Class In Samsung Galaxy S
Solution 1:
Thanks for the answers, but the best explanation I got was here: Inflate a view in a background thread
Basically, it seems that Samsung Galaxy S has an EditText
implementation whose inflation can only be done in the UI Thread.
Hope this helps someone who runs into the same kind of problem.
Solution 2:
Don't update your UI from a background thread -- use the UI thread only.
The stack trace looks like the inflation is happening in the doInBackground
method of an AsyncTask. That's probably this line:
final ArrayList<View> views = MyClass.b(inflater);
If that's the case, then you should move it out of the background thread. If the code you posted is indeed the doInBackground
, you may also want to consider moving your runOnUiThread
block into onPostExecute
.
Solution 3:
Probably similar problem like there: EditText weird crash on LG Optimus w/Swype (works on emulator and Droids)
It seems that invoking Looper.prepare() in the UI thread will fix this exeption.
More info there: http://developer.android.com/reference/android/os/Looper.html
Post a Comment for "Android: Android.view.inflateexception: Binary Xml File Line #13: Error Inflating Class In Samsung Galaxy S"