Sketchware-Pro / Sketchware-Pro

Sketchware Pro's sources in Java. Now anyone can contribute to Sketchware Pro.
https://sketchware.pro
Other
863 stars 254 forks source link

THE OLD SKETCHWARE BUILT-IN LIBS WITH LATEST LIB WAR PROBLEM #1040

Closed abrihamdemisse closed 5 months ago

abrihamdemisse commented 5 months ago

I am really struggling with this Sketchware pro limitation, me using and adding the latest sdk of some library that are built in like okhttp or okio and Sketchware blindly adding it's own outdated libs making two the same library face together clashing each other and causing me a headache. Is there anyone who can help me how can i avoid this and show me how can i use the latest sdk, or if you're sketchware pro app dev looking for something to do, please add a way to enable or disable specific project not to use specific built library in, like built settings or somewhere.

WHAT I HAVE TRIED?

  1. i have removed every network request components and use my own, so the built-in okhttp library is not added, but doing that doesn't remove the built-in one called okio or something that the latest okhttp lib wants to do something idk with it, and expecting some latest okio lib method that the built-in okio lib have never seen in its life time. So me as a cool genius dev adding the latest okio lib but facing this ugly error

" java.lang.NoSuchFieldError: No field Companion of type Lokio/Options$Companion; in class Lokio/Options; or its superclasses (declaration of 'okio.Options' appears in base.apklclasses86.dex) "

while the there is such Field in the latest okio but not in the built-in one, which i think it is telling that there are two two libs the one with a gun and the one with stick trying to fight for their survival in my app, so i need to remove the old one somehow.

  1. I have replaced the _okio.dex and jar files in .sketchware/libs folder with the latest lib dex and jar files but this doesn't work as well.

here is me -> reporting this and hoping for someone brilliant guy making my day bright and bring my stupid app to a live again.

JavkhlanK commented 5 months ago

Use what's described in #696.

abrihamdemisse commented 5 months ago

Use what's described in #696.

not working, when i try to download the file downloaded like 4MB and client error and the file corrupt.

Why changing or replacing the library jar and dex class doesn't fix it?

JavkhlanK commented 5 months ago

Files in .sketchware/libs aren't used for projects in Sketchware Pro v6.3.0 fix1 and newer, excluding Local libraries.

abrihamdemisse commented 5 months ago

Files in .sketchware/libs aren't used for projects in Sketchware Pro v6.3.0 fix1 and newer, excluding Local libraries.

Anyways i fixed it by replacing the libs dex and jar file in lib.zip file in the apk. thanks ☺