finaly i'm back with problem

when i step over this line :
MultipartEntity requestContent = new MultipartEntity();

I have error on logcat :
08-26 16:40:40.225: WARN/dalvikvm(244): VFY: unable to resolve direct
method 3325: Lorg/apache/james/mime4j/message/Multipart;.<init> ()V
08-26 16:40:40.245: WARN/dalvikvm(244): VFY:  rejecting opcode 0x70 at
0x0000
08-26 16:40:40.256: WARN/dalvikvm(244): VFY:  rejected Lorg/apache/
http/entity/mime/HttpMultipart;.<init> ()V
08-26 16:40:40.276: WARN/dalvikvm(244): Verifier rejected class Lorg/
apache/http/entity/mime/HttpMultipart;

You have an idea?


On 24 août, 16:27, code_android_festival_way
<[EMAIL PROTECTED]> wrote:
> Well I've managed it to add representation of the Uri to a multipart
> message. And here is the way I did it:
>
> http://paste.pocoo.org/show/83196/
>
> It is working quite fine.
>
> Regards!
>
> On 24 Aug., 15:46, code_android_festival_way
>
> <[EMAIL PROTECTED]> wrote:
> > I got another question regarding that topic.
>
> > I'm letting my user pic a photo from the Image ContentProvider. After
> > that I'm getting back an Uri which represents the image in the
> > ContentProvider. Now I'm wondering which is the easiest way to get
> > that picture which is represented by an Uri into a FileBody or
> > InputStreamBody. I didn't find a chance to create a File object out of
> > the Uri. My second try was to put my InputStream which I get from
> > "openInputStream(Uri uri)" into the InputStreamBody but now I'm
> > wondering which could be the name for that file? (I even dont know the
> > type of the image. Is it a jpg or png or sth. else) So it would be
> > nice if someone could help me with that.
>
> > Regards!
>
> > On 23 Aug., 06:20, shotwave <[EMAIL PROTECTED]> wrote:
>
> > > the problem was with missing <uses-permission
> > > android:name="android.permission.INTERNET" /> permission in
> > > AndroidManfest.xml. As soon as I have set it and __removed .android
> > > folder__ everything started working!
>
> > > On Aug 22, 10:16 pm, shotwave <[EMAIL PROTECTED]> wrote:
>
> > > > thank you, guys
>
> > > > On Aug 22, 3:01 am, code_android_festival_way
>
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hello!
>
> > > > > I have done it the following way:
>
> > > > >http://paste.pocoo.org/show/GwHe8LrG9DCnq4zuphmK/
>
> > > > > (note that this is just a sample code the HttpClient needs some
> > > > > setup)
>
> > > > > Using it this waymultipartmessages work quite fine.
>
> > > > > Regards!
>
> > > > > On 22 Aug., 07:16, shotwave <[EMAIL PROTECTED]> wrote:
>
> > > > > > I also have problems withmultipartentities, so I have followed the
> > > > > > recomendations given here and added mime4j and httpmime as the
> > > > > > libraries to my eclipse project, however once I have started the app
> > > > > > and tried to upload some data I have got an exception
>
> > > > > > 08-22 01:11:12.672: WARN/dalvikvm(229): VFY: unable to resolve new-
> > > > > > instance 255 (Lorg/apache/commons/io/output/ByteArrayOutputStream;) 
> > > > > > in
> > > > > > Lorg/apache/http/entity/mime/HttpMultipart;
> > > > > > 08-22 01:11:12.682: WARN/dalvikvm(229): VFY:  rejecting opcode 0x22 
> > > > > > at
> > > > > > 0x0031
> > > > > > 08-22 01:11:12.692: WARN/dalvikvm(229): VFY:  rejected Lorg/apache/
> > > > > > http/entity/mime/HttpMultipart;.getTotalLength ()J
> > > > > > 08-22 01:11:12.692: WARN/dalvikvm(229): Verifier rejected class 
> > > > > > Lorg/
> > > > > > apache/http/entity/mime/HttpMultipart;
> > > > > > 08-22 01:11:12.722: WARN/System.err(229): java.lang.VerifyError:
> > > > > > org.apache.http.entity.mime.HttpMultipart
> > > > > > 08-22 01:11:12.782: WARN/System.err(229):     at
> > > > > > org.apache.http.entity.mime.MultipartEntity.<init>(MultipartEntity.java:
> > > > > > 76)
> > > > > > 08-22 01:11:12.852: WARN/System.err(229):     at
> > > > > > org.apache.http.entity.mime.MultipartEntity.<init>(MultipartEntity.java:
> > > > > > 99)
> > > > > > 08-22 01:11:12.862: WARN/System.err(229):     at
> > > > > > com.sphericbox.jigsaw.LoginActivity
> > > > > > $YesClickListener.onClick(LoginActivity.java:78)
> > > > > > 08-22 01:11:12.862: WARN/System.err(229):     at
> > > > > > android.view.View.performClick(View.java:2068)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.view.View.onTouchEvent(View.java:3453)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.widget.TextView.onTouchEvent(TextView.java:4347)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.view.View.dispatchTouchEvent(View.java:3108)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:841)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:841)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:841)
> > > > > > 08-22 01:11:12.872: WARN/System.err(229):     at
> > > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:841)
> > > > > > 08-22 01:11:12.902: WARN/System.err(229):     at
> > > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:841)
> > > > > > 08-22 01:11:12.902: WARN/System.err(229):     at
> > > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:841)
> > > > > > 08-22 01:11:12.912: WARN/System.err(229):     at
> > > > > > com.android.internal.policy.impl.PhoneWindow
> > > > > > $DecorView.superDispatchTouchEvent(PhoneWindow.java:1552)
> > > > > > 08-22 01:11:12.912: WARN/System.err(229):     at
> > > > > > com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
> > > > > > 1059)
> > > > > > 08-22 01:11:12.932: WARN/System.err(229):     at
> > > > > > android.app.Activity.dispatchTouchEvent(Activity.java:1872)
> > > > > > 08-22 01:11:12.932: WARN/System.err(229):     at
> > > > > > com.android.internal.policy.impl.PhoneWindow
> > > > > > $DecorView.dispatchTouchEvent(PhoneWindow.java:1536)
> > > > > > 08-22 01:11:12.932: WARN/System.err(229):     at
> > > > > > android.view.ViewRoot.handleMessage(ViewRoot.java:1088)
> > > > > > 08-22 01:11:12.932: WARN/System.err(229):     at
> > > > > > android.os.Handler.dispatchMessage(Handler.java:88)
> > > > > > 08-22 01:11:12.932: WARN/System.err(229):     at
> > > > > > android.os.Looper.loop(Looper.java:123)
> > > > > > 08-22 01:11:12.932: WARN/System.err(229):     at
> > > > > > android.app.ActivityThread.main(ActivityThread.java:3708)
> > > > > > 08-22 01:11:12.962: WARN/System.err(229):     at
> > > > > > java.lang.reflect.Method.invokeNative(Native Method)
> > > > > > 08-22 01:11:12.972: WARN/System.err(229):     at
> > > > > > java.lang.reflect.Method.invoke(Method.java:492)
> > > > > > 08-22 01:11:12.972: WARN/System.err(229):     at
> > > > > > com.android.internal.os.ZygoteInit
> > > > > > $MethodAndArgsCaller.run(ZygoteInit.java:734)
> > > > > > 08-22 01:11:12.972: WARN/System.err(229):     at
> > > > > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:492)
> > > > > > 08-22 01:11:12.972: WARN/System.err(229):     at
> > > > > > dalvik.system.NativeStart.main(Native Method)
>
> > > > > > could you pls help me with that?
>
> > > > > > On Aug 18, 8:11 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > Looks like you also need the Apache Commons IO library which you 
> > > > > > > can
> > > > > > > get fromhttp://commons.apache.org/io/.
>
> > > > > > > Cheers,
> > > > > > > Justin
> > > > > > > Android Team @ Google
>
> > > > > > > On Aug 18, 3:19 pm, code_android_festival_way
>
> > > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > > > So I'm back with a question. I've imported the libraries 
> > > > > > > > mentioned
> > > > > > > > above and got the following setup:
>
> > > > > > > >http://paste.pocoo.org/show/82631/
>
> > > > > > > > Now I get an error while executing the POST method with the
> > > > > > > > HttpClient. Am I doing sth. wrong or what do I have to change 
> > > > > > > > to get
> > > > > > > > it working. (the paste above is cutted down to the most 
> > > > > > > > important
> > > > > > > > parts)
>
> > > > > > > > The error message:
>
> > > > > > > > Error in ....org.apache.commons.io.ouput.ByteArrayOutputStream
>
> > > > > > > > I'm looking forward getting some answers.
>
> > > > > > > > Regards!
>
> > > > > > > > On 18 Aug., 22:35, code_android_festival_way
>
> > > > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > > > > Thank you for your answer Dan.
>
> > > > > > > > > I'm looking now how to get the whole thing working. (since 
> > > > > > > > > I'm not the
> > > > > > > > > best Java developer :) )
>
> > > > > > > > > I will come back with the results later on.
>
> > > > > > > > > On 18 Aug., 22:26, "Dan Morrill" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > To shed a bit more light, the reason the multi-part APIs 
> > > > > > > > > > were removed is
> > > > > > > > > > because those APIs will not be final in the upstream Apache 
> > > > > > > > > > HTTPClient in
> > > > > > > > > > time for Android's schedule for a final 1.0 version.  
> > > > > > > > > > Rather than ship an
> > > > > > > > > > early/incompatible API, we chose to remove it, and rely on 
> > > > > > > > > > other libraries
> > > > > > > > > > as Justin suggested.
>
> > > > > > > > > > Note that this applies only to the multi-part APIs: the 
> > > > > > > > > > rest of the Apache
> > > > > > > > > > HTTPClient APIs have been frozen, and so they are "safe" 
> > > > > > > > > > for us to include.
> > > > > > > > > > (Seehttp://www.nabble.com/-VOTE--RESULT--HttpClient-4.0-API-freeze-td1863...
> > > > > > > > > > )
>
> > > > > > > > > > - Dan
>
> > > > > > > > > > On Mon, Aug 18, 2008 at 1:10 PM, Justin (Google Employee) 
> > > > > > > > > > <[EMAIL PROTECTED]>wrote:
>
> > > > > > > > > > > Note that this has been removed because it was removed 
> > > > > > > > > > > from the Apache
> > > > > > > > > > > HttpClient library that we're bundling. What you want to 
> > > > > > > > > > > do is get
> > > > > > > > > > > Mime4j (http://james.apache.org/mime4j/index.html) and 
> > > > > > > > > > > HttpMime
> > > > > > > > > > > (http://hc.apache.org/httpcomponents-client/httpmime/index.html)
> > > > > > > > > > >  and
> > > > > > > > > > > include these libraries in your Android project. From 
> > > > > > > > > > > there, the usage
> > > > > > > > > > > ofmultipartrequests is pretty intuitive.
>
> > > > > > > > > > > Cheers,
> > > > > > > > > > > Justin
> > > > > > > > > > > Android Team @ Google
>
> > > > > > > > > > > On Aug 18, 1:06 pm, code_android_festival_way
> > > > > > > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > > > > > > > Hello guys.
>
> > > > > > > > > > > > I've seen that themultipartmethod has been removed in 
> > > > > > > > > > > > 0.9. I'm
> > > > > > > > > > > > wondering now how to achieve these messages now.
>
> > > > > > > > > > > > At the moment I'm having something like:
>
> ...
>
> plus de détails »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to