안드로이드 개발 질문/답변
(글 수 45,052)
파일 업로드를 구현하고 있습니다.
그런데 MultipartEntity 를 생성해서 addpart 하는데 에러가 발생 합니다.
MultipartEntity multipart = new MultipartEntity();
Charset chars = Charset.forName("UTF-8");
multipart.addPart("data", new FileBody(new File(filePath)));
multipart.addPart("userNo", new StringBody(userNo, chars));
발생한 에러는 아래와 같이 org.apache.james.mime4j.message.SingleBody 가 필요 하다고 하는데요.
Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for org.apache.james.mime4j.message.SingleBody. Fix the build path then try building this project test-Android Unknown Java Problem
제가 추가한 jar는 httpmime-4.0.3.jar 입니다.
import에는 해당 class들이 제대로 import 되어 있습니다.
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.DefaultHttpClient;
이렇게요..에러도 발생 하지 않구요.
그러데 james 패키지는 메일서버 관련 패키지가 아닌지요?
따로 jar 구해서 classpath에 넣어줘야 하나요?