You've already forked lazarus-ccr
JNI example: Small improvements
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2166 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -56,10 +56,6 @@
|
|||||||
<TargetOS Value="linux"/>
|
<TargetOS Value="linux"/>
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
|
||||||
<GenerateDebugInfo Value="False"/>
|
|
||||||
<UseLineInfoUnit Value="False"/>
|
|
||||||
</Debugging>
|
|
||||||
<Options>
|
<Options>
|
||||||
<ExecutableType Value="Library"/>
|
<ExecutableType Value="Library"/>
|
||||||
</Options>
|
</Options>
|
||||||
|
@ -4,8 +4,8 @@ library nativetest;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils,
|
SysUtils,
|
||||||
jni in 'jni.pas',
|
jni,
|
||||||
log in 'log.pas';
|
log;
|
||||||
|
|
||||||
const curClass:JClass=nil;
|
const curClass:JClass=nil;
|
||||||
nativeCodeLoaded:JfieldID=nil;
|
nativeCodeLoaded:JfieldID=nil;
|
||||||
@ -36,6 +36,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
__android_log_write(ANDROID_LOG_INFO,'nativetest','Reading curClass');
|
||||||
curClass:=curEnv^.FindClass(curEnv,'com/pascal/jnitest/AndroidJNITest');
|
curClass:=curEnv^.FindClass(curEnv,'com/pascal/jnitest/AndroidJNITest');
|
||||||
if not assigned(curClass) then begin
|
if not assigned(curClass) then begin
|
||||||
__android_log_write(ANDROID_LOG_FATAL,'nativetest','curEnv^.FindClass failed');
|
__android_log_write(ANDROID_LOG_FATAL,'nativetest','curEnv^.FindClass failed');
|
||||||
|
Reference in New Issue
Block a user