I'm new, so, before all, I apologize for my mistakes (about english and more).
I found lots of questions about this problem but there are no answers that can solve my problem.
Here it is:
public class DeusCaritasEst extends Activity implements OnClickListener {
private String mFileName = "HelloWorld";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_deus_caritas_est);
Button button = (Button) findViewById(R.id.invia);
button.setOnClickListener(this);
}
@Override
public void onClick(View v) {
new MyAsyncTask().execute(mFileName);
}
private class MyAsyncTask extends AsyncTask<String, Integer, Double> {
@Override
protected Double doInBackground(String... params) {
// TODO Auto-generated method stub
post();
return null;
}
}
public void post() {
MultipartEntity multipartEntity = new MultipartEntity();
HttpPost httpPost = new HttpPost();
httpPost.setEntity(multipartEntity);
}
}
I created a simple class that do nothing, just for seeing what was the error, and:
12-06 15:15:53.128: E/AndroidRuntime(16126): Caused by: java.lang.NoClassDefFoundError: org.apache.http.entity.mime.MultipartEntity
I linked httpmime (tried many different versions) library by "Project/Properties/JavaBuildPath/Libraries/add External Jars". But nothing work.
Tried many times Project/Clean, reboot Eclipse or pc :D
Same error with MultiPartEntityBuilder, with every version of httpmime/core.
What can I do?