Android Question okHttp source help lib

vercettyDev

Active Member
Licensed User
Longtime User
Hello, I'm trying to create a lib that has the dependency "okhttp and okio"
but let it be directly in the lib.
embedded.
I tried something like: @DependsOn(values={"okhttp-3.12.12", "okio-1.17.5"})
but i don't want to use #AdditionalJar
what better way to create a lib with all dependencies built in?
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
what better way to create a lib with all dependencies built in?
No better way because it is a mistake to do. It will make your library incompatible with any other library that is based on the same dependencies.

You don't need to add #AdditionalJar if you are building the library correctly.
 
Upvote 0

vercettyDev

Active Member
Licensed User
Longtime User
so for example how do I embed "okhttp.jar" and "okio.jar" in my library?

I need to do this, I have no other way for the project I'm developing
 
Upvote 0

vercettyDev

Active Member
Licensed User
Longtime User
Yes, I know that, but my doubt is how to incorporate these external .jar files into my library.
i know adding @dependson will compile with SLC.
And then add #AdditionalJar.
But I need to incorporate these dependencies directly into the library.
What should I research to be able to do this?
 
Upvote 0

vercettyDev

Active Member
Licensed User
Longtime User
trying to compile b4a's github okHttp library

I get the following error:

I already added the .jar with @DepensOn and all imports

Libs_OkHttp\src\okhttp3\internal\huc\OkHttpURLConnection.java:54: error: cannot find symbol
import okhttp3.internal.Version;
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…