Android app crashing


#1

Dear Experts ,

I am not able to run the sample application .
The app is crashing when i invoke the following line

detector = new CameraDetector(this, CameraDetector.CameraType.CAMERA_FRONT, cameraPreview);
I am trying to run the app using emulator .
Do I need to have some special emulator settings .

regards
Mahesh


#2

I found the following exception while executing the sample program .
Could you please give me some pointers …It seems the andorid is not able to find the affective native shared library .I tried modifying the gradle files as per -https://stackoverflow.com/questions/33861705/android-error-loading-jni-library-when-running-an-app . But it was of not much use .

Any pointers ?

09-03 18:44:23.983 2681-2681/com.digiledge.light.smile E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.digiledge.light.smile, PID: 2681
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/com.digiledge.light.smile-1/base.apk”],nativeLibraryDirectories=[/data/app/com.digiledge.light.smile-1/lib/x86, /system/lib, /vendor/lib]]] couldn’t find "libaffdexface_jni.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:984)
at java.lang.System.loadLibrary(System.java:1530)
at com.affectiva.android.affdex.sdk.detector.AffdexFaceJNI.(SourceFile:20)
at com.affectiva.android.affdex.sdk.detector.AffdexFaceJNI$$InjectAdapter.get(SourceFile:27)
at com.affectiva.android.affdex.sdk.detector.AffdexFaceJNI$$InjectAdapter.get(SourceFile:14)
at com.affectiva.android.affdex.sdk.detector.AffdexFaceJNIWrapper$$InjectAdapter.get(SourceFile:52)
at com.affectiva.android.affdex.sdk.detector.AffdexFaceJNIWrapper$$InjectAdapter.get(SourceFile:19)
at com.affectiva.android.affdex.sdk.detector.FrameProcessor$$InjectAdapter.get(SourceFile:62)
at com.affectiva.android.affdex.sdk.detector.FrameProcessor$$InjectAdapter.get(SourceFile:23)
at com.affectiva.android.affdex.sdk.detector.CameraDetector$$InjectAdapter.injectMembers(SourceFile:71)
at com.affectiva.android.affdex.sdk.detector.CameraDetector$$InjectAdapter.injectMembers(SourceFile:22)
at dagger.ObjectGraph$DaggerObjectGraph.inject(ObjectGraph.java:281)
at com.affectiva.android.affdex.sdk.detector.Detector.(SourceFile:69)
at com.affectiva.android.affdex.sdk.detector.CameraDetector.(SourceFile:72)
at com.affectiva.android.affdex.sdk.detector.CameraDetector.(SourceFile:111)
at com.digiledge.light.smile.MainActivity.onCreate(MainActivity.java:24)
at android.app.Activity.performCreate(Activity.java:6679)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)


#3

When I loaded on the real phone , it is working.

Query - Does this will work only on real phones ?


#4

the native libraries bundled with the SDK are for armeabi-v7a, so the SDK only works on ARM-based processors.


#5