Professional Documents
Culture Documents
2013
Now we need to prepare laz4android. Edit the file laz4android\build.bat and set the correct path.
Save the file and execute it. It will compile&bulid lazarus. When finished, start lazarus.exe and select Package Install/Uninstall Packages
Now double-click on customdraw and then click on button save and rebuild IDE.
Now close the IDE. Let's start the SDK Manager. (or directly from E:\android\sdk\SDK Manager.exe)
After that, you need to setup a virtual android device. Let's start the AVD Manager. (or directly from E:\android\sdk\AVD Manager.exe)
After setup, press button <Start> to start the virtual Android Device. Yeesss, its very slowwww. (JAVA??) Wait,wait and then it should look like this:
When you start laztoapk the first time, a search-dialog will show up and you need to setup the directories/file for sdk ndk jdk 1.6 lazbuild.exe The search dialog works like this: a.) select the initial folder. (search will start from here) b.) press button Find. c.) select the item in the list and double-click onto to continue. For sdk it looks for example like this:
After all 4 items are setup, the main screen of laztoapk will be shown.
Select the folder projects and press button Create new folder.
Create a new folder project1, select the new folder and press button <OK>.
In the following dialog, define a password for your app and press button <OK>.
The project will be compiled&linked. The command window will look something like this:
You have to enter the same password as before twice in the command windows
This will build the final apk-file and should look something like this:
Now the final step Step 5 to install the apk into the running android device. Make sure you have selected Emulator and your virtual android device is up an running.
Select the file <project1.apk> from the bin-folder and press button <Open>.
Let's run the app. Click at the top right as displayed here.
Questions
1. 2. 3. 4. Why do we need JDK installed? Why does it only work with JDK 1.6 but not with JDK 1.7? Which packages must really be installed in the SDK Manager? What could be removed so we do not need 4 Gbyte diskspace?