0

I have downloaded the spen SDK along with the sample code. However when I try to build the code I am getting runtime exception as follows :

Log :

06-11 20:16:52.950: E/AndroidRuntime(542): FATAL EXCEPTION: main
06-11 20:16:52.950: E/AndroidRuntime(542): java.lang.NoClassDefFoundError: com.samsung.spensdk.SCanvasView
06-11 20:16:52.950: E/AndroidRuntime(542):  at com.samsung.spensdk.example.startup.SPen_Example_StartUp.onCreate(SPen_Example_StartUp.java:50)
06-11 20:16:52.950: E/AndroidRuntime(542):  at android.app.Activity.performCreate(Activity.java:4465)
06-11 20:16:52.950: E/AndroidRuntime(542):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

I have followed the steps as instructed in the samsung developer site. i.e I have included the libspen23.jar along with the library files (.so) in the armeabi folder and have configured the build path as well. However I am still getting the above mentioned error. Please, can anyone guide me if I am going wrong somewhere?

jabaldonedo
  • 25,822
  • 8
  • 77
  • 77
scooby
  • 493
  • 11
  • 31
  • When you say that you "have configured the build path as well", what specifically do you mean? If you mean you fixed the R22 "Order & Export" problem (http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22/16596990#16596990), that's cool. But if you added the S-Pen SDK JAR manually to your build path, that is not cool. – CommonsWare Jun 11 '13 at 17:51
  • What I meant is that i have added the library manually. Also something to note is that if i try to run the sample code I believe that i dont really need to include the library.that is bcoz the sample code has all the code of the library as well. only if i try to create a new project then i have to include the libraries and the jar file. thats my understanding.. – scooby Jun 11 '13 at 17:57

1 Answers1

0

What I meant is that i have added the library manually

I have no idea what you mean by the term "manually".

Based on what you have written here, what you want is:

libs/
  libspen23.jar
  armeabi/
    whateverTheyCalledIt.so

and no manual modifications to the Eclipse build path (other than the "Order & Export" fix I mentioned in my comment).

If your libs/ directory has any other structure, that may not work.

Note that I have no direct experience with the S-Pen SDK (as I cannot accept their license terms).

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I have the structure that you mention. i.e 'libs/ libspen23.jar armeabi/ whateverTheyCalledIt.so' Manually means that i copied the above mentioned jar, and the libraries inside the libs. and then configured the build path so that libspen23.jar show up in the list of libraries in the library tab. – scooby Jun 11 '13 at 18:07
  • @scooby: "then configured the build path so that libspen23.jar show up in the list of libraries in the library tab" -- undo that. The *only* manual change to the Eclipse build path is to fix the R22 "Order & Export" issue I have now mentioned twice. – CommonsWare Jun 11 '13 at 18:11
  • Thank you for ur support. Will check and confirm. – scooby Jun 11 '13 at 18:18