Still no luck adding OnClick event lazarus / 43-Android ---------------------------------------------------------------------- stab · 2012-11-13 09:30 Hi, Platform: Windows 7/64 Have tried with Lazarus: 0.9.30.4, FPC: 2.6.0 Lazarus-1.1-39266-fpc-2.6.0-20121109-win32, FPC: 2.6.0 Lazarus-1.1-39274-fpc-2.6.1-20121113-win32, FPC: 2.6.0 Lazarus-1.1-39275-fpc-2.6.1-20121113-win64, FPC: 2.6.0 and succeed to generate, install and run androidlcl-example on android-phone but when I add a new button and try to add OnClick-event I always get error: Unable to create new method. In message window the error is: unit not found: types and Controls unit opens and cursor set to types in uses clause. Have done Rescan Ftp Source Directory but no luck. Unit Controls always show up and I wonder if the problem can be due to the fact that there is unit controls in lcl\units\arm-linux and also in  lcl\units\i386-win32 lcl\units\x86_64-win64. In which order is the code loaded? Regards stab ---------------------------------------------------------------------- zeljkoc · 2012-11-13 09:36 the same is happening with me, but when I put a new button I work as nonandroid application ---------------------------------------------------------------------- stab · 2012-11-13 10:23 Hi zeljkoc, Thanks for replying. Do you mean that you have succeeded by adding OnClick-event in nonandroid app, saving and then compiling android app as both uses same code. /stab ---------------------------------------------------------------------- stab · 2012-11-13 10:44 Hi all, The trick seem to be to add new functionality(only tested so far vid buttonOnClick) in NonAndroidApp, save, open AndroidApp using same code, build, generate key, build_apk, install /stab ---------------------------------------------------------------------- PeterT · 2012-12-27 02:57 Hello, I had the same problem when I used the pre-compiled compiler for Windows as described in: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Usin g_the_pre-compiled_compiler_in_Windows The error message stated that the unit Classes (its source) cannot be found. This is how I solved it: 1. I downloaded the source from the svn: https://p-tools.svn.sourceforge.net/svnroot/p-tools/fpc4android I used TortoiseSVN: at first its "Checkout" function and then using its "Export" function (to get only the sources without the .svn stuff around) I copied the sources to a folder in my computer. 2. Under the fpc\2.5.1 folder (which has been created in the process described on the wiki page linked above) I created a folder called "source" (C:\lazarus11\fpc\2.5.1\source in my case) and copied there the folders "rtl" and "packages" from the downloaded sources. 3. Then I used "Tools/Rescan Ftp Source Directory" from the main menu of Lazarus And now it works correctly