Open mhous33 opened 7 months ago
Three possibilities:
-cf
option, which might give better/more accurate output)Overall, you have not provided enough data to figure this issue out yet - no mention of the specific symbol name or anything.
Thanks for the reply!
I just tried again, using your latest release. Here are my steps:
1) d2j-dex2jar.sh .apk
2) extract dex2jar.jar
3) delete all contents except org/koin directory
4) jar -cf koin.jar *
5) copy koin.jar to android studio project libs directory
6) In android studio:
project structure > dependencies > Add Dependency > JAR/AAR Dependency
libs/koin.jar
implementation
This produces the following in my build.gradle dependencies list:
implementation(files("libs/koin.jar"))
7) Run app
This produces the following error:
/home/mhous33/AndroidStudioProjects/RetroRazr/app/src/main/java/com/motorola/retrorazr/RazrApplication.java:24: error: cannot find symbol ComponentCallbacksExtKt.startKoin$default(this, this, CollectionsKt.listOf((Object[]) new Function1[]{KoinModulesKt.getButtonsModule(), KoinModulesKt.getSoftKeysModule(), KoinModulesKt.getDialNumberModule(), KoinModulesKt.getStatusBarModule(), KoinModulesKt.getStateModule()}), null, false, null, 28, null); ^ symbol: method startKoin$default(RazrApplication,RazrApplication,List
Let me know if I can provide any more details!
ComponentCallbacksExtKt.startKoin$default
is exactly something that dex2jar probably tries to convert to Java, but is not able to:
It tries to replace the $
by a .
, but this fails as default
by its own is a reserved keyword in Java. Hence, it is not possible to properly convert this function.
There are a few workarounds, but none has been implemented yet. Your best bet currently is to just rename this function on your own (it should exist - just with a slightly different, but very similar name).
Thanks for the info! I will have to try a different approach.
I am trying to rebuild an apk in android studio that I decompiled with jadx. The apk depends on a deprecated version of the koin dependency injection framework. I have tried adding current koin dependencies to my build.gradle, but it does not resolve the dependencies. I have also tried adding the koin java source to the project, but the source does not compile. So I had the idea to use dex2jar to get the koin class files and build a standalone jar to add to my project. I think I have done this correctly, as the koin import statements are satisified, however, when I try to build the apk, android studio throws the error: "error: cannot find symbol" referring to one of the classes in the koin jar library. Any ideas as to why this is not working?