我的代码:(Delphi tokio - 平台android)
procedure TfrmPrincipal.Button3Click(Sender: TObject);
var reader : JNBioBSPJNI;
serial : string;
begin
try
serial:='010701-613E5C7F4CC7C4B0-72E340B47E034015'; //same result
// serial:='com.nitgen.SDK.AndroidBSP.NBioBSPJNI'; //same result
reader:=TJNBioBSPJNI.JavaClass.init(StringToJString(serial),nil);
except
on E:exception do begin
showmessage('Error message: '+E.message); //invoke error method not found
log.d('Error message: '+E.message);
end;
end;
end;
part JNI result of JAVA2OP:
JStaticValsClass = interface(IJavaClass)
['{F277D6F2-9ACC-448A-A6DD-A4260F6EFC8F}']
{class} function _GetwLength_GET_ID: Integer; cdecl;
{class} function _GetwLength_GET_VALUE: Integer; cdecl;
{class} function _GetwLength_SET_VALUE: Integer; cdecl;
{class} property wLength_GET_ID: Integer read _GetwLength_GET_ID;
{class} property wLength_GET_VALUE: Integer read _GetwLength_GET_VALUE;
{class} property wLength_SET_VALUE: Integer read _GetwLength_SET_VALUE;
end;
[JavaSignature('com/nitgen/SDK/AndroidBSP/StaticVals')]
JStaticVals = interface(IJavaInstance)
['{DA5CCD8C-5E1A-4D04-8B26-A4DD4DE47D5B}']
end;
TJStaticVals = class(TJavaGenericImport<JStaticValsClass, JStaticVals>) end;
JNBioBSPJNIClass = interface(JStaticValsClass)
['{2D840611-7F30-44F0-8C9E-41D04209A14D}']
....
{class} function init(P1: JString; P2: JActivity): JNBioBSPJNI; cdecl; overload;
{class} function init(P1: JString; P2: JActivity; P3: JNBioBSPJNI_CAPTURE_CALLBACK): JNBioBSPJNI; cdecl; overload;
...
end;
[JavaSignature('com/nitgen/SDK/AndroidBSP/NBioBSPJNI')]
JNBioBSPJNI = interface(JStaticVals)
['{D793D8DA-DF09-4BBD-93AA-8E18A7084529}']
...
end;
TJNBioBSPJNI = class(TJavaGenericImport<JNBioBSPJNIClass, JNBioBSPJNI>) end;
Android Device Monitor:
08-25 09:08:28.643: I/info(15041): FMX: delivex: Error message: Invoke error: method not found
08-25 09:08:28.674: D/SurfaceFlinger(630): duplicate layer name: changing br.com.exsis.delivex/com.embarcadero.firemonkey.FMXNativeActivity to br.com.exsis.delivex/com.embarcadero.firemonkey.FMXNativeActivity#1
08-25 09:08:28.683: D/SurfaceFlinger(630): duplicate layer name: changing br.com.exsis.delivex/com.embarcadero.firemonkey.FMXNativeActivity to br.com.exsis.delivex/com.embarcadero.firemonkey.FMXNativeActivity#1
请问有什么建议吗?
答案1
已解决 我在部署时添加了 x86 库。我将其更改为 armeabi-v7a 库