Hi, i want to move a project from Toothpick to Koin. In the project is used the dexguard lib for protection.
At the building time, i getting en error.
This is the end of stactrace.
Unexpected error while computing stack sizes:
Class = [o/hD$if$10]
Method = [ˏ(Ljava/lang/Object;)Ljava/lang/Object;]
Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [18] astore v5 in [o/hD$if$10.ˏ(Ljava/lang/Object;)Ljava/lang/Object;])
:app:dexguardRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexguardRelease'.
> Stack size becomes negative after instruction [18] astore v5 in [o/hD$if$10.ˏ(Ljava/lang/Object;)Ljava/lang/Object;]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 25s
31 actionable tasks: 31 executed
ERROR: Job failed: exit code 1
Is it en error of a dexguard or a koin? How can i fix it?
P.S. This is error i have got after implementing the koin.
Hello Koin don't use any reflection/proxy, proguard should go without any problem.
Can you deactivate rules and activate it one by one?
I use dexguard not proguard. Or is it without a difference?
What rules do you mean?
I don't know dexguard sorry :/
Can you run without it?
Can you share a project on github?
You don't need any keep rules normally for Proguard or Dexguard. We use
Koin in a production app with Dexguard without any problem (0.9.x branch).
On Thu, 12 Jul 2018, 17:27 Arnaud Giuliani, notifications@github.com
wrote:
I don't know dexguard sorry :/
Can you run without it?
Can you share a project on github?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/InsertKoinIO/koin/issues/167#issuecomment-404552159,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAL_ZZQ3CfBXhKOD5DKCwBmIyWwvIOisks5uF2r4gaJpZM4VM0UT
.
Can you run without it?
It runs excellent without it.
Can you share a project on github?
Unfortunately no. But there is nothing special.
What version do you use?
Fixed a regression about this topic. Fixed in 1.0.0-beta-5, you won't required any proguard rule for Koin or break any dex/shrink tool.
Thank you!
How can i try 1.0.0-beta-5 in my project?
depends on the used module,
implementation "org.koin:koin-android-viewmodel:$koin_version"
// or implementation "org.koin:koin-android:$koin_version"
// or implementation "org.koin:koin-android-scope:$koin_version"
with koin_version as 1.0.0-beta-5
Аnd last question.
Can i use 1.0.0-beta-5 in production, or it's better to wait for the release?
You could. 1.0.0-beta-5 is already a good one. You can start to use it to make your first tests.
Thanks again!
I really liked the koin with its simplicity! I use one in another personal project.
I checked on 1.0.0-beta-5 version. The error is the same.
Can you make several tests: test it with proguard. Make it with dexguard in a 2nd time to check what is the problem, on which call there is a problem (also check your rules).
Ok i'll try to do it as soon as posible.
Thanks for you responsiveness!
Most helpful comment
Fixed a regression about this topic. Fixed in
1.0.0-beta-5, you won't required any proguard rule for Koin or break any dex/shrink tool.