Building androidlcltest under windows lazarus / 43-Android ---------------------------------------------------------------------- BigSid56 · 2012-05-18 12:15 androidlcltest builds fine but when I run build_debug_apk.bat I get lots of errors, a sample is shown below. I'm using ppcrossarm.exe as the compiler. Any ideas why please? location: class com.pascal.lcltest.LCLActivity.LCLInputConnection       _lclView = (View) targetView;                   ^ [loading java\lang\Integer.class(java\lang:Integer.class)] [loading java\lang\Number.class(java\lang:Number.class)] src\com\pascal\lcltest\LCLActivity.java:55: cannot find symbol symbol  : variable Log location: class com.pascal.lcltest.LCLActivity.LCLInputConnection       Log.v("lclproject", "LCLInputConnection.commitText =" + text + " newCursor Position=" + Integer.toString(newCursorPosition));       ^ src\com\pascal\lcltest\LCLActivity.java:62: cannot find symbol symbol  : method postInvalidate() location: class com.pascal.lcltest.LCLActivity.LCLSurface         if ((eventResult & 1) != 0) lclsurface.postInvalidate();                                               ^ src\com\pascal\lcltest\LCLActivity.java:52: method does not override or implemen t a method from a supertype     @Override public boolean commitText(CharSequence text, int newCursorPosition )     ^ ---------------------------------------------------------------------- felipemdc · 2012-05-18 13:52 Which Android SDK version do you have? Did you fix the paths in the .bat to correctly represent the ones in your system? ---------------------------------------------------------------------- BigSid56 · 2012-06-20 19:39 I have it working now, but when I run the app in the emulator it crashes. The log is below. I saw this post by someone with the same problem: Ok, I fixed it by replacing javaEnvRef^^.GetLongField with javaEnvRef^^.GetIntField for any instances of lclxdpi, lclydpi, screenwidth and screenheight in customdrawnwinapi_android.inc. But I have no idea how to apply this. Is there an updated file available? Thanks! I/lclapp  (  800): LCLOnCreate called by LCLActivity.onCreate W/dalvikvm(  800): JNI WARNING: GetLongField for field 'lclxdpi' of expected typ e J, got I W/dalvikvm(  800):              in Lcom/pascal/lcltest/LCLActivity;.LCLOnCreate: (Lcom/pascal/lcltest/LCLActivity;)I (GetLongField) I/dalvikvm(  800): "main" prio=5 tid=1 NATIVE I/dalvikvm(  800):   | group="main" sCount=0 dsCount=0 obj=0x409c1460 self=0x128 10 I/dalvikvm(  800):   | sysTid=800 nice=0 sched=0/0 cgrp=default handle=107408295 2 I/dalvikvm(  800):   | schedstat=( 247146534 986954795 58 ) utm=8 stm=16 core=0 I/dalvikvm(  800):   at com.pascal.lcltest.LCLActivity.LCLOnCreate(Native Method ) I/dalvikvm(  800):   at com.pascal.lcltest.LCLActivity.onCreate(LCLActivity.java :241) I/dalvikvm(  800):   at android.app.Activity.performCreate(Activity.java:4465) I/dalvikvm(  800):   at android.app.Instrumentation.callActivityOnCreate(Instrum entation.java:1049) I/dalvikvm(  800):   at android.app.ActivityThread.performLaunchActivity(Activit yThread.java:1920) I/dalvikvm(  800):   at android.app.ActivityThread.handleLaunchActivity(Activity Thread.java:1981) I/dalvikvm(  800):   at android.app.ActivityThread.access$600(ActivityThread.jav a:123) I/dalvikvm(  800):   at android.app.ActivityThread$H.handleMessage(ActivityThrea d.java:1147) I/dalvikvm(  800):   at android.os.Handler.dispatchMessage(Handler.java:99) I/dalvikvm(  800):   at android.os.Looper.loop(Looper.java:137) I/dalvikvm(  800):   at android.app.ActivityThread.main(ActivityThread.java:4424 ) I/dalvikvm(  800):   at java.lang.reflect.Method.invokeNative(Native Method) I/dalvikvm(  800):   at java.lang.reflect.Method.invoke(Method.java:511) I/dalvikvm(  800):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.r un(ZygoteInit.java:784) I/dalvikvm(  800):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 551) I/dalvikvm(  800):   at dalvik.system.NativeStart.main(Native Method) I/dalvikvm(  800): E/dalvikvm(  800): VM aborting F/libc    (  800): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1) ---------------------------------------------------------------------- felipemdc · 2012-06-20 20:26 Quote from: BigSid56 on June 20, 2012, 09:39:15 pmOk, I fixed it by replacing javaEnvRef^^.GetLongField with javaEnvRef^^.GetIntField for any instances of lclxdpi, lclydpi, screenwidth and screenheight in customdrawnwinapi_android.inc. But I have no idea how to apply this. Is there an updated file available? Are you using the latest SVN sources? If not, then you should. Probably this problem is already fixed there. You can visualize the SVN sources here: http://svn.freepascal.org/cgi- bin/viewvc.cgi/?root=lazarus But you should use a SVN client to download them to your compiler Are you using the VM Image with Mageia Linux? If yes, you can just do: cd lazarus svn update In a terminal and it will be updated. ---------------------------------------------------------------------- BigSid56 · 2012-06-20 20:49 I found the customdrawnwinapi_android.inc file, made the mods and LCL test now runs! Very cool! I'm using windows 7. Is there an SVN client that you'd recommend for Windows 7? I've not used one before. Thanks! ---------------------------------------------------------------------- felipemdc · 2012-06-20 21:04 I use tortoiseSVN in Windows, see here: http://wiki.freepascal.org/TortoiseSvn ---------------------------------------------------------------------- BigSid56 · 2012-06-22 12:29 I'd like to use your Listview, but CDWidgetSet.ShowListViewDialog is not available, only CDWidgetSet.ShowSelectItemDialog. Is there a new code version I can get to allow it? Thanks! ---------------------------------------------------------------------- felipemdc · 2012-06-22 14:06 It is available in the latest SVN code. How did you install your current Lazarus? ---------------------------------------------------------------------- BigSid56 · 2012-06-22 14:17 I installed it from an exe then recently updated it from the SVN code. It is now V0.9.31. I've just been building fpc4android using your instructions http://wik i.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Building_the_c ompiler_yourself_in_Windows using https://p-tools.svn.sourceforge.net/svnroot/p-tools/fpc4android as I thought that might be what I need. Thanks