There is only 1 folder under the lib folder: armeabi. And it contain 1 file: liblclapp.so.
This is certainly your problem. Your app is not built for x86 android, only arm.
Okay, so now we found the problem. Can you please check my steps and see where I did it wrong?
The steps I used to produce the apk file:
1. Start
VirtualBox and run the
WinXP sp 3 machine
2. Empty
project1 folder (remove all files created from previous attempts)
3. Start LazToApk and click the "
manual" tab
4. Click "
Step 1: Select/Create Project Folder" and point it to
project1 folder
5. Set the password: 123456
6. Start
Lazarus and open "
project1android.lpi" in the project1 folder
7. Add "
..\..\downloads\android-ndk-r10d\platforms\android-16\arch-x86\usr\lib" to the Library Path
8. Add "
..\..\downloads\android-ndk-r10d\toolchains\x86-4.8\prebuilt\windows\lib\gcc\i686-linux-android\4.8" to the Library Path
9. Move the ARM item to the lowest in the search path
10. Set Config and Target to
Android, i386, (Default)11. Empty the
Custom Options (remove -dANDROID -Xd -CpARMV6)
12. Press the "Save All" button to update all the changes in Lazarus
13. Close Lazarus, so now back to LazToApk
14. Click "
Step 2: Build Project"
15. Wait until it said "145 lines compiled, 8.0 sec. 2 warning(s) issued. 10 hint(s) issued"
16. Click "
Step 3: Create Android Key" and answer the questions
17. Click "
Step 4: Create APK File"
18. The APK file is generated
Additional information you may need to know:
- Computer: Intel Core 2 Quad with Ubuntu 15.04 64-bit + MATE Desktop 1.8.2
- Phone: Asus Zenfone 2 Intel Atom Quad Core 64-bit with Android 5.0
- Oracle VirtualBox 4.3.26 with WinXP sp3 virtual machine
- LazToApk version 0.9.0.32
- Laz4Android version 1.5-49903-FPC3.1.1
- Lazarus version 1.5 SVN 49563 with FPC 3.1.1
- SDK Build-Tool version 22.0.1
- NDK-Platform version 4.1.2 (API 16)
- Java JDK version 1.8.0_51
- Project1 path: C:\laztoapk\projects\project1
- APK file and path: C:\laztoapk\projects\project1\android\bin\project1.apk
- Items in Library Path:
C:\laztoapk\downloads\android-ndk-r10d\platforms\android-16\arch-x86\usr\lib
C:\laztoapk\downloads\android-ndk-r10d\toolchains\x86-4.8\prebuilt\windows\lib\gcc\i686-linux-android\4.8
C:\laztoapk\downloads\android-ndk-r10d\platforms\android-16\arch-arm\usr\lib
I checked the steps again and again. I can't find anything wrong. Did I missed something?
I can't use adb logcat. Because to test my apk file I have to run it directly on my phone.
adb runs on both emulator and phone, run it on the phone (use -d instead of -e).
I'm not familiar with adb, did you mean the file
adb_logcat.bat that can be found in the ...\projectpath\android? I run it, but it said "waiting for device" and then nothing happened even I plugged usb cable to my phone. I think it won't able to connect to my phone because it was running in
VirtualBox. Actually it works, but only if I run in emulator mode.
Do you think I should have a real Windows environment to run LazToApk and the AVD (not using VirtualBox)? I own a licensed Windows, but I'm reluctant to make my computer multi-boot.