裏面報錯
Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class <unknown>
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
其實我29行是一個Spinner
<Spinner
android:id="@+id/number_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2" />
大概操作是 在 AsyncTask 中的 doInBackground 操作界面 出現這個問題
最後在 doInBackground 方法中加入
Looper.prepare();
Ok了