1
我正在編寫一個AsyncTask
其中包括一個progressDialog
。當我嘗試將上下文作爲參數傳遞時,我得到一個空點異常。什麼是適當的參數傳遞? c
應該初始化爲什麼?上下文返回空指針異常
public class ExportDatabaseFileTask extends AsyncTask<String, Void, Boolean> {
Context c;
private final ProgressDialog dialog = new ProgressDialog(c.getApplicationContext());
}
我也試過,但它沒有工作,也沒有工作 – JustCurious
你試過什麼和不起作用? – silentnuke