Having issues integrating Scandit SDK into my app - android

Decided to use Scandit SDK to get the barcode scanning feature in my app. Unfortunately, since I'm relatively new to Android development and Java in general I've run into a few issues that I can't seem to work out. The demo that Scandit provided doesn't give any errors(runs fine) but crashes when I try to start it up (pressing a button from one activity is meant to start it up). I've tried reading the logcat and googling a solution to the problems but I'm not getting the right solutions. Does anyone have an idea of what I'm doing wrong?
Logcat is provided below:
10-08 23:30:00.807 21563-21563/com.kwesimbia.management D/AndroidRuntime? Shutting down VM
10-08 23:30:00.807 21563-21563/com.kwesimbia.management W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0x40aa4228)
10-08 23:30:00.817 21563-21563/com.kwesimbia.management E/AndroidRuntime? FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3082)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.kwesimbia.management.ScanditSDKDemoSimple
at com.kwesimbia.management.Activity_D.initiateCodeScan(Activity_D.java:63)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3077)
at android.view.View.performClick(View.java:3549)
at android.view.View$PerformClick.run(View.java:14393)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Process: com.kwesimbia.management
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger? App crashed!
Package: com.kwesimbia.management v1 (1.0)
10-08 23:30:00.817 32726-587/? E/EmbeddedLogger?
Application Label: firstapp
10-08 23:30:00.827 32726-587/? W/ActivityManager?
Force finishing activity com.kwesimbia.management/.Activity_D

I came across this problem as well, my solution was to extract the library files and put them as their files in the lib folder
The library basically isn't being exported with it
EDIT
So I checked out my project, basically I did these things:
In the libs folder I have a new folder called armeabi and inside that I have libscanditsdk-android-3.3.1.so
Then in my build path I have also referenced the jar file that they provide:
<classpathentry exported="true" kind="lib" path="C:/GIT/Android/FwayScannerProject/FwayScanner/libs/scanditsdk-barcodepicker-android-3.3.1.jar"/>

Related

Crashlytics NoClassDefFoundError: com.crashlytics.android.answers.Answers

I get a project from other developer to fix minor issues in app, when I'm running my app on device I'm getting an error:
15142-15142/com.etripconcept E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.crashlytics.android.answers.Answers
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:224)
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:207)
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:202)
at com.etripconcept.SplashScreenActivity.onCreate(SplashScreenActivity.java:16)
at android.app.Activity.performCreate(Activity.java:5163)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
I'm new in Android development, so it may be stupid question, but Google doesn't say anything about it. I use Android Studio 1.2.2 on Win 8.1

Android Studio seems to build old version of project

I am wondering if this is some bug in Android Studio or I am simply lack od knowladge but straight to the point.
I am writing simple client-server via bluetooth app on android. At some point I encoured following problem:
07-11 18:59:20.553 10364-10364/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not find a method parujUrzadzenia(View) in the activity class com.example.pc.klient_serwerbluetooth.Klient for onClick handler on view class android.widget.Button with id 'button6'
at android.view.View$1.onClick(View.java:3775)
at android.view.View.performClick(View.java:4421)
at android.view.View$PerformClick.run(View.java:18190)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoSuchMethodException: parujUrzadzenia [class android.view.View]
at java.lang.Class.getConstructorOrMethod(Class.java:460)
at java.lang.Class.getMethod(Class.java:915)
at android.view.View$1.onClick(View.java:3768)
at android.view.View.performClick(View.java:4421)
at android.view.View$PerformClick.run(View.java:18190)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
07-11 19:34:00.498 449-522/? E/ActivityManager﹕ The package com.example.pc.klient_serwerbluetooth is not found. Failure starting process com.example.pc.klient_serwerbluetooth
For what I understand Android Studio can't find method parujUrzadzenia(View) that is marked in button6's properties as onClick method...the funny thing is i deleted this button in my way of solving this problem.
I can't post picture of my project due to low reputation but like I said. I've deleted the reference to method from .xml and method from .java file and got an error saying that there is no required onClick method. So I deleted this whole button and still got this error.
Any advices will be greatly appreciated.

Vuforia jPCT integration and build jni

I getting following error while running imagetarge vuforia jPCT project
W/dalvikvm(3469): threadid=1: thread exiting with uncaught exception (group=0xa4c4e648)
E/AndroidRuntime(3469): FATAL EXCEPTION: main
E/AndroidRuntime(3469): java.lang.UnsatisfiedLinkError: Native method not found: com.qualcomm.ar.pl.CameraPreview.newFrameAvailable:(IIII[B)V
E/AndroidRuntime(3469): at com.qualcomm.ar.pl.CameraPreview.newFrameAvailable(Native Method)
E/AndroidRuntime(3469): at com.qualcomm.ar.pl.CameraPreview.onPreviewFrame(CameraPreview.java:805)
E/AndroidRuntime(3469): at android.hardware.Camera$EventHandler.handleMessage(Camera.java:791)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(3469): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime(3469): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(3469): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime(3469): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime(3469): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(3469): at dalvik.system.NativeStart.main(Native Method)
I read all vuforia blog and google search but not able to solve problem
Please help me...
Used latest vaforia.jar to solve problem
Download latest sdk from https://developer.vuforia.com/resources/sdk/android

NullPointer exception at android.support.v4.app.FragmentManagerImpl.makeInactive

I'm seeing a weird exception in Android Support Library - the stack trace is below. Any ideas what could be causing this? I'm unable to reproduce the exception on any of my devices, but there seem to be quite a few visible in the Google Play DevConsole.
java.lang.NullPointerException
at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1133)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1044)
at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1171)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:582)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1416)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:420)
at android.os.Handler.handleCallback(Handler.java:608)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
try check stack fragments in time rotate screen for example in onResume.

Exception in ActivityThread.setupGraphicsSupport()

I got the exception message from user.
java.lang.NullPointerException
at android.app.ActivityThread.setupGraphicsSupport(ActivityThread.java:3738)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3808)
at android.app.ActivityThread.access$1300(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1197)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
He uses samsung galaxy S2 (ICS 4.0.3 with tegrak kernel and ADW launcher ex)
It's difficult to find what's the problem with this exception log.
Can anybody suggest a starting point to find why this exception raised.
Thanks.

Categories

Resources