Forum

Browse topics, discover Works With Legrand community!

DoorEntrySDKDemo-problem with org.spongycastle.jce.provider.BouncyCastleProvider

Dear Legrand-Support,

I am still trying to get the DoorEntrySDKDemo v3.0 running.

I use Android Studio v3.6.1 and I have installed Android SDK v28.0.3.

I am able to successfully build and run the demo app and I am also able to login in my account.

I can also see my Plant. But if I click on it I get following error:


--------- beginning of crash
03-21 09:01:12.486 11823-11823/com.legrandgroup.doorentry.sdkdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.legrandgroup.doorentry.sdkdemo, PID: 11823
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/spongycastle/jce/provider/BouncyCastleProvider;
at com.legrandgroup.doorentry.sdk.util.VctSecurity.generateCsrRequest(VctSecurity.java:84)
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure.setState(PlantAlignmentProcedure.java:135)
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure.setState(PlantAlignmentProcedure.java:92)
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure.access$200(PlantAlignmentProcedure.java:36)
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure$1.onRequestCompleted(PlantAlignmentProcedure.java:233)
at com.legrandgroup.doorentry.sdk.rest.RestRequestManager$RunnableTask$1.run(RestRequestManager.java:194)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.spongycastle.jce.provider.BouncyCastleProvider" on path: DexPathList[[zip file "/data/app/com.legrandgroup.doorentry.sdkdemo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.legrandgroup.doorentry.sdkdemo-1/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.legrandgroup.doorentry.sdk.util.VctSecurity.generateCsrRequest(VctSecurity.java:84) 
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure.setState(PlantAlignmentProcedure.java:135) 
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure.setState(PlantAlignmentProcedure.java:92) 
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure.access$200(PlantAlignmentProcedure.java:36) 
at com.legrandgroup.doorentry.sdk.procedures.PlantAlignmentProcedure$1.onRequestCompleted(PlantAlignmentProcedure.java:233) 
at com.legrandgroup.doorentry.sdk.rest.RestRequestManager$RunnableTask$1.run(RestRequestManager.java:194) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Suppressed: java.lang.ClassNotFoundException: org.spongycastle.jce.provider.BouncyCastleProvider
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 15 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

It looks like that BouncyCastleProvider is not included inside the APK. I added a rule to ‘proguard-rules.pro’ and tried also to build it as debug and release.
Also an Analysis with ‘Analyze APK’ and a look at the .dex-file shows that it should be included.

Also your Forum and Google weren’t very helpful. I played around with MultiDex and ProGuard Rules but I couldn’t get to a solution.

I am pretty sure it is really easy for your dev-team to know what the problem is.

Thanks in Advance.

Best regards,
ThorsHamster

Hello,

For information, I asked the SDK dev team to investigate on it. I’m waiting for their feedback

Have a good day,

Leslie – Community Manager

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Information

watch_later 1 week, 4 days ago
message1 reply
people2 participants