Error Android Get Template In Byte

General information about Neurotechnology and its software

Error Android Get Template In Byte

Postby andycanul » Jan 24, 2019 22:25

I have this Error ina Android, i can´t get byte[]

I have this code
Code: Select all
Intent intent = new Intent();
Bundle b = new Bundle();
byte[] nFTemplate = subject.getTemplate().getFingers().save().toByteArray();
b.putByteArray(RECORD_REQUEST_FINGER, Arrays.copyOf(nFTemplate, nFTemplate.length));
intent.putExtras(b);
setResult(RESULT_OK, intent);
finish();


This is the error that returns me

Code: Select all
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.andy_.karmav4, PID: 23775
    java.lang.NoClassDefFoundError: com.neurotec.io.NBuffer
        at com.neurotec.io.NBuffer$2.fromHandle(NBuffer.java:111)
        at com.neurotec.lang.NObject.fromHandleInternal(NObject.java:271)
        at com.neurotec.lang.NObject.fromHandle(NObject.java:312)
        at com.neurotec.lang.NObject.fromHandle(NObject.java:260)
        at com.neurotec.lang.NObject.save(NObject.java:809)
        at com.neurotec.lang.NObject.save(NObject.java:796)
        at com.example.andy_.karmav4.Activities.EditImageActivity.SaveTemplate(EditImageActivity.java:170)
        at com.example.andy_.karmav4.Activities.EditImageActivity.onOptionsItemSelected(EditImageActivity.java:354)
        at android.app.Activity.onMenuItemSelected(Activity.java:3384)
        at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:436)
        at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
        at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
        at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
        at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:64)
        at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:204)
        at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
        at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
        at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
        at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
        at android.support.v7.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
        at android.widget.AdapterView.performItemClick(AdapterView.java:343)
        at android.widget.AbsListView.performItemClick(AbsListView.java:1664)
        at android.widget.AbsListView$PerformClick.run(AbsListView.java:4075)
        at android.widget.AbsListView$10.run(AbsListView.java:6557)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6776)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/sun/jna/WeakIdentityHashMap;
        at com.neurotec.io.NBuffer.<clinit>(NBuffer.java:121)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.neurotec.lang.NTypeMap.warmUp(NTypeMap.java:209)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:254)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:420)
        at com.neurotec.lang.NType.<clinit>(NType.java:150)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.neurotec.lang.NTypeMap.warmUp(NTypeMap.java:209)
        at com.neurotec.lang.NTypeMap.get(NTypeMap.java:270)
        at com.neurotec.lang.NObject.fromHandleInternal(NObject.java:269)
        at com.neurotec.lang.NObject.fromHandle(NObject.java:309)
        at com.neurotec.lang.NRational.nativeTypeOf(NRational.java:41)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.neurotec.lang.NTypeMap.warmUp(NTypeMap.java:209)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:254)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:392)
        at com.neurotec.lang.NTypes.<clinit>(NTypes.java:203)
        at com.neurotec.media.NMedia.<clinit>(NMedia.java:46)
        at com.neurotec.view.NGui.<clinit>(NGui.java:47)
        at com.neurotec.view.NGui.init(NGui.java:66)
        at com.neurotec.view.NViewBase.<clinit>(NViewBase.java:30)
        at com.example.andy_.karmav4.Activities.EditImageActivity.LoadBiometrics(EditImageActivity.java:221)
        at com.example.andy_.karmav4.Activities.EditImageActivity.onCreate(EditImageActivity.java:134)
        at android.app.Activity.performCreate(Activity.java:6956)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
        at android.app.ActivityThread.-wrap14(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
        at android.os.Handler.dispatchMessage(Handler.java:102)
           ... 5 more


How can I resolve it ?
andycanul
 
Posts: 1
Joined: Jan 24, 2019 22:00

Re: Error Android Get Template In Byte

Postby MartynasV » Jan 25, 2019 12:38

andycanul wrote:I have this Error ina Android, i can´t get byte[]

I have this code
Code: Select all
Intent intent = new Intent();
Bundle b = new Bundle();
byte[] nFTemplate = subject.getTemplate().getFingers().save().toByteArray();
b.putByteArray(RECORD_REQUEST_FINGER, Arrays.copyOf(nFTemplate, nFTemplate.length));
intent.putExtras(b);
setResult(RESULT_OK, intent);
finish();


This is the error that returns me

Code: Select all
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.andy_.karmav4, PID: 23775
    java.lang.NoClassDefFoundError: com.neurotec.io.NBuffer
        at com.neurotec.io.NBuffer$2.fromHandle(NBuffer.java:111)
        at com.neurotec.lang.NObject.fromHandleInternal(NObject.java:271)
        at com.neurotec.lang.NObject.fromHandle(NObject.java:312)
        at com.neurotec.lang.NObject.fromHandle(NObject.java:260)
        at com.neurotec.lang.NObject.save(NObject.java:809)
        at com.neurotec.lang.NObject.save(NObject.java:796)
        at com.example.andy_.karmav4.Activities.EditImageActivity.SaveTemplate(EditImageActivity.java:170)
        at com.example.andy_.karmav4.Activities.EditImageActivity.onOptionsItemSelected(EditImageActivity.java:354)
        at android.app.Activity.onMenuItemSelected(Activity.java:3384)
        at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:436)
        at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
        at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
        at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
        at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:64)
        at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:204)
        at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
        at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
        at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
        at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
        at android.support.v7.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
        at android.widget.AdapterView.performItemClick(AdapterView.java:343)
        at android.widget.AbsListView.performItemClick(AbsListView.java:1664)
        at android.widget.AbsListView$PerformClick.run(AbsListView.java:4075)
        at android.widget.AbsListView$10.run(AbsListView.java:6557)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6776)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/sun/jna/WeakIdentityHashMap;
        at com.neurotec.io.NBuffer.<clinit>(NBuffer.java:121)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.neurotec.lang.NTypeMap.warmUp(NTypeMap.java:209)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:254)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:420)
        at com.neurotec.lang.NType.<clinit>(NType.java:150)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.neurotec.lang.NTypeMap.warmUp(NTypeMap.java:209)
        at com.neurotec.lang.NTypeMap.get(NTypeMap.java:270)
        at com.neurotec.lang.NObject.fromHandleInternal(NObject.java:269)
        at com.neurotec.lang.NObject.fromHandle(NObject.java:309)
        at com.neurotec.lang.NRational.nativeTypeOf(NRational.java:41)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.neurotec.lang.NTypeMap.warmUp(NTypeMap.java:209)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:254)
        at com.neurotec.lang.NTypeMap.add(NTypeMap.java:392)
        at com.neurotec.lang.NTypes.<clinit>(NTypes.java:203)
        at com.neurotec.media.NMedia.<clinit>(NMedia.java:46)
        at com.neurotec.view.NGui.<clinit>(NGui.java:47)
        at com.neurotec.view.NGui.init(NGui.java:66)
        at com.neurotec.view.NViewBase.<clinit>(NViewBase.java:30)
        at com.example.andy_.karmav4.Activities.EditImageActivity.LoadBiometrics(EditImageActivity.java:221)
        at com.example.andy_.karmav4.Activities.EditImageActivity.onCreate(EditImageActivity.java:134)
        at android.app.Activity.performCreate(Activity.java:6956)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
        at android.app.ActivityThread.-wrap14(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
        at android.os.Handler.dispatchMessage(Handler.java:102)
           ... 5 more


How can I resolve it ?

Hello,

Make sure that "SDK\Bin\Android\neurotec-core-android.jar" is included in your application. It seems that you are missing it.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 479
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: No registered users and 2 guests