Lumi Wang
Lumi Wang

Reputation: 73

pen sdk SpenSurfaceView initiate androidruntime error

I'm trying to use the samsung spen sdk pen-v5.1.0_full.aar. The .aar file is put under /libs and added to the dependencies in build.gradle file.

I can initiate the spen fine (from com.samsung.android.sdk.pen.Spen),

I can also initiate a SpenPenDetachmentListener (from com.samsung.android.sdk.pen.engine.SpenPenDetachmentListener),

however, when initiating SpenSurfaceView (from com.samsung.android.sdk.pen.engine.SpenSurfaceView), I get an AndroidRunTime error:

02-11 16:30:03.921 25242 25242 E art     : No implementation found for boolean com.samsung.android.sdk.pen.engine.SpenGLInView.Native_isSupported() (tried Java_com_samsung_android_sdk_pen_engine_SpenGLInView_Native_1isSupported and Java_com_samsung_android_sdk_pen_engine_SpenGLInView_Native_1isSupported__)
02-11 16:30:03.922 25242 25242 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for boolean com.samsung.android.sdk.pen.engine.SpenGLInView.Native_isSupported() (tried Java_com_samsung_android_sdk_pen_engine_SpenGLInView_Native_1isSupported and Java_com_samsung_android_sdk_pen_engine_SpenGLInView_Native_1isSupported__)
02-11 16:30:03.922 25242 25242 E AndroidRuntime:    at com.samsung.android.sdk.pen.engine.SpenGLInView.Native_isSupported(Native Method)
02-11 16:30:03.922 25242 25242 E AndroidRuntime:    at com.samsung.android.sdk.pen.engine.SpenGLInView.isSupported(SpenGLInView.java:6619)
02-11 16:30:03.922 25242 25242 E AndroidRuntime:    at com.samsung.android.sdk.pen.engine.SpenSurfaceView.construct(SpenSurfaceView.java:365)
02-11 16:30:03.922 25242 25242 E AndroidRuntime:    at com.samsung.android.sdk.pen.engine.SpenSurfaceView.<init>(SpenSurfaceView.java:277)

I suspect that it's something I did wrong with import / using the .aar sdk, yet I don't understand why the Spen and the PenDetachmentListener can initiate fine yet the SpenSurfaceView not.

The apk compiles OK and would only crash when something tries to initiate the SpenSurfaceView.

Upvotes: 0

Views: 362

Answers (1)

Lumi Wang
Lumi Wang

Reputation: 73

It turned out that, SpenSurfaceView expect that Spen is initiated. After initiating Spen first, SpenSurfaceView is initiating fine.

Upvotes: 0

Related Questions