Futronic阅读器错误:java.lang.UnsatifiedLink错误:本机方法FutronicInitialize()没有实现
我正在将Futronic阅读器错误:java.lang.UnsatifiedLink错误:本机方法FutronicInitialize()没有实现,java,android,Java,Android,我正在将Android应用程序与Futronic指纹读取器集成。我在尝试使用新FutronicEnrollment实例化类FutronicEnrollment时遇到了一个障碍(来自提供的示例) 具体错误如下所述 java.lang.UnsatisfiedLinkError: No implementation found for int futronictech.SDKHelper.FutronicSdkBase.FutronicInitialize() (tried Java_futro
Android
应用程序与Futronic指纹读取器
集成。我在尝试使用新FutronicEnrollment
实例化类FutronicEnrollment
时遇到了一个障碍(来自提供的示例)
具体错误如下所述
java.lang.UnsatisfiedLinkError: No implementation found for int
futronictech.SDKHelper.FutronicSdkBase.FutronicInitialize()
(tried Java_futronictech_SDKHelper_FutronicSdkBase_FutronicInitialize
and Java_futronictech_SDKHelper_FutronicSdkBase_FutronicInitialize__)
下面提供了调用Futronic注册课程的方法:
public void StartEnrollWithUsername(String szFingerName, int sdkVersion) {
try
{
if (!usb_host_ctx.ValidateContext()) {
throw new Exception("Can't open USB device");
}
// CreateFile( szFingerName );
m_OperationObj = new DbRecord();
((DbRecord) m_OperationObj).setUserName(szFingerName);
m_Operation = new FutronicEnrollment((Object) usb_host_ctx);
m_Operation.FutronicInitialize();
// Set control properties
m_Operation.setFakeDetection(true);
m_Operation.setFFDControl(true);
m_Operation.setFFDControl(true);
((FutronicEnrollment) m_Operation)
.setMIOTControlOff(true);
((FutronicEnrollment) m_Operation).setMaxModels(Integer
.parseInt(maxFram));
switch (sdkVersion) {
case 0:
m_Operation.setVersion(VersionCompatible.ftr_version_previous);
break;
case 1:
m_Operation.setVersion(VersionCompatible.ftr_version_current);
break;
default:
m_Operation.setVersion(VersionCompatible.ftr_version_compatible);
break;
}
// start enrollment process
((FutronicEnrollment) m_Operation).Enrollment(this);
} catch (Exception e) {
Toast.makeText(getActivity().getApplicationContext(), "Cannot start enrollment operation.\nError description: "
+ e.getMessage(), Toast.LENGTH_LONG).show();
m_Operation = null;
m_OperationObj = null;
usb_host_ctx.CloseDevice();
}
}
Futronic注册课程如下:
/*
* FutronicEnrollment.java
*
*/
package futronictech.SDKHelper;
/**
* The "Enrollment operation" class
*/
public class FutronicEnrollment extends FutronicSdkBase implements Runnable
{
protected static int MinModelsValue = 1;
protected static int MaxModelsValue = 10;
protected static int DefaultModelsValue = 5;
/**
* The FutronicEnrollment class constructor.
* Initialize a new instance of the FutronicEnrollment class.
*
* @exception FutronicException Error occurs during SDK initialization.
* To get error code, see method <code>getErrorCode</code> of FutronicException
* class.
*/
public FutronicEnrollment(Object ctx)
throws FutronicException
{
super();
m_bMIOTControlOff = true;
m_Template = null;
m_Quality = 0;
m_MaxModels = DefaultModelsValue;
SetIoCtx(ctx);
}
/**
* This function starts the enrollment operation.
*
* The enrollment operation starts in its own thread. To interact with the
* enrollment operation caller must implement the <code>IEnrollmentCallBack</code>
* interface and should specify it. The interface methods denote following:
* <table>
* <thead>
* <tr>
* <td>Method</td>
* <td>Description</td>
* </tr>
* </thead>
* <tr>
* <td>OnPutOn</td>
* <td>Invitation for touching the fingerprint scanner surface.</td>
* </tr>
* <tr>
* <td>OnTakeOff</td>
* <td>Proposal to take off a finger from the scanner surface.</td>
* </tr>
* <tr>
* <td>UpdateScreenImage</td>
* <td>The "Show the current fingerprint image" event.</td>
* </tr>
* <tr>
* <td>OnFakeSource</td>
* <td>The "Fake Finger Detected" event. This event raises only if
* <code>FakeDetection</code> and <code>FFDControl</code> properties are
* <code>true</code>.</td>
* </tr>
* <tr>
* <td>OnEnrollmentComplete</td>
* <td>This event is signaled when the enrollment operation is completed.
* If the operation is completed successfully, you may get a template.</td>
* </tr>
* </table>
* If the enrollment operation is completed successfully, you may get a
* template. The next call of the enrollment operation removes the last
* created template.
*
* @param callBack reference to call back interface (can not be NULL)
*
* @exception IllegalStateException the object is not in an appropriate
* state for the requested operation or the object disposed.
*
* @exception NullPointerException a null reference parameter callBack is
* passed to the function.
*/
public void Enrollment( IEnrollmentCallBack callBack )
throws IllegalStateException, NullPointerException
{
CheckDispose();
if( m_State != EnrollmentState.ready_to_process )
throw new IllegalStateException( "The object is not in an appropriate state for the requested operation" );
if( callBack == null )
throw new NullPointerException( "A null reference parameter callBack is passed to the function." );
m_State = EnrollmentState.process_in_progress;
m_CallBack = callBack;
m_bCancel = false;
// run new thread
m_WorkedThread = new Thread( this, "Enrollment operation" );
m_WorkedThread.start();
}
/**
* get the MIOT mode setting
*
* @exception IllegalStateException the object disposed.
*/
public boolean getMIOTControlOff()
throws IllegalStateException
{
CheckDispose();
return m_bMIOTControlOff;
}
/**
* Enable or disable the MIOT mode
*
* Set to <code>true</code>, if you want to enable the MIOT mode.
*
* @param bMIOTControl new value
*
* @exception IllegalStateException the object is not in an appropriate
* state for the requested operation or the object disposed.
*/
public void setMIOTControlOff( boolean bMIOTControlOff )
throws IllegalStateException
{
CheckDispose();
if( m_State != EnrollmentState.ready_to_process )
throw new IllegalStateException( "The object is not in an appropriate state for the requested operation" );
m_bMIOTControlOff = bMIOTControlOff;
}
/**
* get max number of models in one template.
*
* @exception IllegalStateException the object disposed.
*/
public int getMaxModels()
throws IllegalStateException
{
CheckDispose();
return m_MaxModels;
}
/**
* Set max number of models in one template.
*
* This value must be between 3 and 10.
*
* @param MaxModels new value
*
* @exception IllegalStateException the object is not in an appropriate
* state for the requested operation.
* @exception IllegalStateException the object disposed.
* @exception IllegalArgumentException a method has been passed an
* inappropriate argument MaxModels.
*/
public void setMaxModels( int MaxModels )
throws IllegalStateException, IllegalArgumentException
{
CheckDispose();
if( m_State != EnrollmentState.ready_to_process )
throw new IllegalStateException( "The object is not in an appropriate state for the requested operation" );
if( MaxModels < 1 || MaxModels > 10 )
throw new IllegalArgumentException( "The value of argument 'MaxModels' is outside the allowable range of values.");
m_MaxModels = MaxModels;
}
/**
* Returns the template of the last enrollment operation.
*
* Returns a copy of template. If the last enrollment operation is
* unsuccessful, the return code is null.
*
* @exception IllegalStateException the object is not in an appropriate
* state for the requested operation. The enrollment operation is started.
* @exception IllegalStateException the object disposed.
*/
public byte[] getTemplate()
throws IllegalStateException
{
CheckDispose();
if( m_State != EnrollmentState.ready_to_process )
throw new IllegalStateException( "The object is not in an appropriate state for the requested operation. The enrollment operation is started" );
if( m_Template == null )
return null;
return m_Template.clone();
}
/**
* Return the quality of the template.
*
* Return value may be one of the following: 1 (the lowest quality) to 10
* (best quality). If the enrollment operation is unsuccessful or was not
* started, the return value is 0.
*
* @exception IllegalStateException the object is not in an appropriate
* state for the requested operation. The enrollment operation is started.
* @exception IllegalStateException the object disposed.
*/
public int getQuality()
{
CheckDispose();
if( m_State != EnrollmentState.ready_to_process )
throw new IllegalStateException( "The object is not in an appropriate state for the requested operation. The enrollment operation is started" );
return m_Quality;
}
/**
* The main thread of the enrollment operation.
*/
public void run()
{
int nResult = RETCODE_INTERNAL_ERROR;
try
{
synchronized( m_SyncRoot )
{
m_Template = null;
m_Quality = 0;
nResult = FutronicEnroll(GetIoCtx());
}
}
finally
{
m_State = EnrollmentState.ready_to_process;
((IEnrollmentCallBack)m_CallBack).OnEnrollmentComplete( nResult == RETCODE_OK, nResult );
}
}
/**
* The MIOT mode setting.
* You cannot modify this variable directly. Use the <code>getMIOTControl</code>
* and <code>setMIOTControl</code> methods.
* The default value is <code>false</code>.
*/
private boolean m_bMIOTControlOff;
/**
* The template of the last enrollment operation.
* You cannot modify this variable directly. Use the <code>getTemplate</code> method.
*/
private byte[] m_Template;
/**
* Estimation of a template quality in terms of recognition:
* 1 corresponds to the worst quality, 10 denotes the best.
*/
private int m_Quality;
/**
* Max number of models in one template. This value must be between 3 and 10.
*/
private int m_MaxModels;
}
注:
应用程序已在与扫描仪通信
非常感谢您在
futronicech.SDKHelper.FutronicSdkBase
库中尝试使用jni函数,该库不存在,m_Operation.futronicialize()代码>
我发现这段代码没有调用m_Operation.futronicialize(),与您的代码相同代码>:
我认为没有这行m_操作.futronicialize()代码>您的代码应该可以工作
希望有帮助请在Weda添加一些代码。我们可以查看以查找错误。你好,贝尼特斯,感谢您的搜索。我正在使用它,因为我从引用代码的同一作者那里收到了它。遇到错误时,我必须尝试调用该方法。问题是该方法不存在。。。sorryHi Miguel,该方法存在于注册类扩展的futrnicbasesdk中。我的意思是,该方法不存在于库中的jni部分中,我认为您应该与库的所有者谈谈您的问题,以获得Miguel的答复