Android Question HttpUtils2 GetString2 unknowm member

mcorbeel

Active Member
Licensed User
Longtime User
I have installed the latest version of HttpUtils2 and HttpJob and in HttpJob an error keeps showing on the GetString2 function as an unknown member. How can I solve this?

getstring2.png
 

sorex

Expert
Licensed User
Longtime User
I had an error like that when I didn't tag/select the okHttp library.

It's not clear that you updated it to/for okHttp or not.
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
Thanks for the reply.
I tried updating to OkHttp but then apart from the same error, GetInputStream is also shown as unknown member...

getinputstream.png
 
Last edited:
Upvote 0

sorex

Expert
Licensed User
Longtime User
did you replace the

HttpUtils2.jar
HttpUtils2.xml

files in the libraries folder aswell?
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
did you replace the

HttpUtils2.jar
HttpUtils2.xml

files in the libraries folder aswell?

But I have to uncheck "HttpUtils2" in my libraries list no?
Because if i don't i get message saying it is declared twice.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I think you have 2 options.

or you use the libary
or you use the class files

I used the library files so I tagged it
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
move the old one out of the libraries folder, when I renamed them it seemed that they were still being read and I got a duplicate lib error showing.
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
You mean remove HttpUtils2.xml and jar out of libraries folder?
I just did, reopened the project and use the class file, and still the same unknown members of GetString2 and GetInputStream.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
yes, move them all to another location and give it another try by copying these file.

OkHttp.xml
OkHttp.jar
HttpUtils2.jar
HttpUtils2.xml

make sure there not a duplicate in the additional libs folder.

not sure if you need to right click and refresh if you close and reopen the project tho.

then tag the Okhttp & httpUtils lib in the libs panel
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
If i remove the class module HttpUtils and HttpJob and use the libraries I get no error anymore.
But the goal of not using the libraries and using the modules instead was that I am communicating with a https server, and I need to initialize the http client using InitializeAcceptAll. I think this is not possible using the libraries?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
my guess is that the library is just the compiled class.

that accept all is that forced into the header?

then you can try with yourdownloadjob.GetRequest.SetHeader(...)
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
How do i use GetRequest.SetHeader? What parameters do I include?
(sorry for not knowing this)
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
Can you create a small project which shows the problem? In the ide File -> Esport as zip. Upload the zip here so we can have a look.
Thanks!
Here is my sample, with class module, not with libraries.
The last 3 functions in the HttpJob module give error "unknown member".
 

Attachments

  • HttpUtils2_issue.zip
    8.4 KB · Views: 220
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
I'm pretty sure that's where it came from.... but I downloaded them again now and now it works perfectly.
Maybe I did some changes being not aware?
Anyway, thanks 1000x
 
Upvote 0
Top