18

Вопрос по android – NoClassDefFondError в Android… но класс находится в одной банке, включенной в путь к классам

Error: User Rate Limit Exceeded

HttpClient httpclient = new DefaultHttpClient();

        HttpPost httpPost = new HttpPost("someurl");
        MultipartEntity multipartEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); //Here throws the exception
        multipartEntity.addPart("data",
                new InputStreamBody(
                        new ByteArrayInputStream(byteArray),
                        "image/png"));
        multipartEntity.addPart("caption", new StringBody(filename));

        httpPost.setEntity((HttpEntity) multipartEntity);

Error: User Rate Limit Exceeded

04-09 10:21:59.362: E/AndroidRuntime(10352): FATAL EXCEPTION: main
04-09 10:21:59.362: E/AndroidRuntime(10352): java.lang.NoClassDefFoundError: org.apache.http.entity.mime.MultipartEntity
04-09 10:21:59.362: E/AndroidRuntime(10352):    at     com.publidirecta.AppAzafata.IniciarGPSActivity2.enviarImagen(IniciarGPSActivity2.java:206)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at com.publidirecta.AppAzafata.IniciarGPSActivity2.onActivityResult(IniciarGPSActivity2.java:196)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.app.Activity.dispatchActivityResult(Activity.java:3908)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.app.ActivityThread.deliverResults(ActivityThread.java:2549)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.app.ActivityThread.handleSendResult(ActivityThread.java:2595)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.app.ActivityThread.access$2000(ActivityThread.java:121)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.os.Handler.dispatchMessage(Handler.java:99)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at android.os.Looper.loop(Looper.java:130)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at  android.app.ActivityThread.main(ActivityThread.java:3701)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at java.lang.reflect.Method.invokeNative(Native Method)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at java.lang.reflect.Method.invoke(Method.java:507)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
04-09 10:21:59.362: E/AndroidRuntime(10352):    at dalvik.system.NativeStart.main(Native Method)

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Apr 09, 2012, 8:42 AMот

Error: User Rate Limit Exceeded

Jun 18, 2012, 11:52 AMот

Error: User Rate Limit Exceeded<a href="http://stackoverflow.com/a/10046725/1289716">stackoverflow.com/a/10046725/1289716</a>

Apr 09, 2012, 8:48 AMот

6ответов

3

Error: User Rate Limit Exceeded

9

Error: User Rate Limit Exceeded

2

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

29

Error: User Rate Limit ExceededlibsError: User Rate Limit Exceeded

0

Error: User Rate Limit Exceeded

  1. Open pom.xml in the project you are facing this
    java.lang.NoClassDefFoundError: org/apache/http/entity/mime/MultipartEntityBuilder

  2. Under dependencies, add this piece of code.

      <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.5.2</version>
            <scope>test</scope>
        </dependency>
    
  3. Clean and rebuild the code.

Error: User Rate Limit Exceeded

3

Error: User Rate Limit Exceeded

RelatedQuestions