ttlock / Android_TTLock_Demo_Deprecated

19 stars 16 forks source link

Android 10 issue #14

Open franciscorosso opened 4 years ago

franciscorosso commented 4 years ago

I am having troubles with Android 10 phones after using ControlLock method. This is the stack trace. Has someone already found a workaround for this?

Thanks!

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at android.util.SparseArray.keyAt(SparseArray.java:295) at com.ttlock.bl.sdk.api.j.f(Unknown Source:76) at com.ttlock.bl.sdk.api.a$5.run(Unknown Source:1534) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:8016) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)

rahnama1370 commented 4 years ago

@franciscorosso In the build.gradle file, set CompileSDKversion to 28.

franciscorosso commented 4 years ago

@franciscorosso In the build.gradle file, set CompileSDKversion to 28.

Thanks! Also must set targetSdkVersion to 28 in order to make it work. I hope TTlock fixes that in the future....