你能幫我找出下面的錯誤是什麼意思嗎?我不知道爲什麼我不能在包裝外面訪問它,我的意思是我應該使用哪種ACCESS SPECIFIER? 我嘗試使用靜態和所有說明符,但仍然無法擺脫此錯誤。當用戶使用相機將圖片上傳到服務器時,我一直在使用它。編譯錯誤= multipartentitybuilder()不公開,不能從外部程序包中訪問
public class Logistic_ReportProblem extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reportproblem);
context = this;
thisActivity = this;
assetsPropertyReader = new AssetsPropertyReader(context);
p = assetsPropertyReader.getProperties("tapp.properties");
url1 = p.getProperty("FP_BASEURL").toString();
url2 = p.getProperty("FP_LOGISTIC_IMGUPLD_PROBLEM").toString();
camera = (Button) findViewById(R.id.btn_camera);
done = (Button) findViewById(R.id.btn_done);
title = (EditText) findViewById(R.id.workorder_title);
notes = (EditText) findViewById(R.id.workorder_notes);
latlongInfo = (TextView) findViewById(R.id.latlngStatus);
showSavedFiles();
camera.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (entity == null) {
entity = new MultipartEntityBuilder();// err
}
if (!checkPermissionForStorage()) {
requestPermissionForStorage();
} else {
if (!checkPermissionForCamera()) {
requestPermissionForCamera();
} else {
if (5 == file_count) {
Toast.makeText(Logistic_ReportProblem.this, "You have already added 5 images", Toast.LENGTH_SHORT).show();
} else {
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);
}
}
}
}
});
請分享你的'MultipartEntityBuilder'代碼。你可能把它變成了一個私人類,或者你根本沒有指定一個訪問說明符 – 0xDEADC0DE
_i知道這個問題之前被問過,但是我搜索了每個where__我沒有找到正確的ans_。請只解釋我的問題..足夠.. – opalfire
是你問我MultiriplentEntityBuilder.class由andriod構建的 – opalfire