Errors during creation of package for Android
Hi,
I have Windows-64bit computer. I installed fpcupdeluxe according to Castle’s docs. FPC and Lazarus: stable.
I uninstalled cross platform tools via fpcupdeluxe.
I installed Castle by downloading zip from master of GitHub. And I compiled it with Lazarus. Compiled build tool.
Then I downloaded command line sdk manager. In fact I have MSYS2 thus I installed all needed Android tools with command (taken from docs) using the Unix-way:
sdkmanager --install \
'platform-tools' \
'platforms;android-28' \
'extras;google;google_play_services' \
'build-tools;28.0.3' \
'extras;android;m2repository' \
'ndk-bundle'
I added needed paths to PATH etc.
Then when packaging the examples using:
castle-engine package --os=android --cpu=arm
I am getting the message error listed below. It’s probably complaining about missing:
C:/Programs/adt-bundle-windows-x86/sdk/ndk-bundle/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
but in fact in ndk-bundle/build/toolchains/ there is no llvm
So I added ${ANDROID_NDK_HOME}toolchains/llvm/prebuilt/windows/bin/:
to PATH (it was not in docs). But still the problem is the same.
Assembling test_bump_mapping
Linking E:\Dev\Delphi\castle-engine-master\examples\mobile\test_bump_mapping\castle-engine-output\android\libtest_bump_mapping_android.so
698196 lines compiled, 103.8 sec
44 warning(s) issued
223 note(s) issued
Compiled library for Android in castle-engine-output\android\libtest_bump_mapping_android_arm.so
Packaging project “test_bump_mapping” for OS / CPU “android / arm” (platform: Android).
castle-engine: Warning: Android: Information about the keys to sign release Android package not found, because “AndroidSigningProperties.txt” file does not exist. See wiki/Android for documentation how to create and use keys to sign release Android apk. Falling back to creating debug apk.
castle-engine: Warning: Icon: No icon in a format readable by our engine (for example, png or jpg) is specified in CastleEngineManifest.xml. Using default icon.
Generated CastleDataInformation.xml.
Project data contains 3 directories, 6 files, total (uncompressed) size 3.00 MB.
process_begin: CreateProcess(NULL, C:/Programs/adt-bundle-windows-x86/sdk/ndk-bundle/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -print-resource-dir, …) failed.
[armeabi-v7a] "Prebuilt ": “libtest_bump_mapping_android.so <= jni/armeabi-v7a/”
[armeabi-v7a] "Install ": “libtest_bump_mapping_android.so => jniLibs/armeabi-v7a/libtest_bump_mapping_android.so”
process_begin: CreateProcess(NULL, C:/Programs/adt-bundle-windows-x86/sdk/ndk-bundle/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./jniLibs/armeabi-v7a/libtest_bump_mapping_android.so, …) failed.
make (e=2): The system cannot find the file specified.
make: *** [jniLibs/armeabi-v7a/libtest_bump_mapping_android.so] Error 2
make: *** Deleting file `jniLibs/armeabi-v7a/libtest_bump_mapping_android.so’
Exception “Exception”:
Process “C:\Programs\adt-bundle-windows-x86\sdk\ndk-bundle\ndk-build.cmd” (absolute path “C:\Programs\adt-bundle-windows-x86\sdk\ndk-bundle\ndk-build.cmd”) failed with exit status 2
I am getting above’s error when packaging:
drawing_toy or test_bump_mapping. But when packaging simple_3d_demo I am getting the error about OpelAl:
Linking E:\Dev\Delphi\castle-engine-master\examples\mobile\simple_3d_demo\castle-engine-output\android\libsimple_3d_demo_android.so
699453 lines compiled, 100.3 sec
52 warning(s) issued
223 note(s) issued
Compiled library for Android in castle-engine-output\android\libsimple_3d_demo_android_arm.so
Packaging project “simple_3d_demo” for OS / CPU “android / arm” (platform: Android).
castle-engine: Warning: Android: Information about the keys to sign release Android package not found, because “AndroidSigningProperties.txt” file does not exist. See Android · castle-engine/castle-engine Wiki · GitHub for documentation how to create and use keys to sign release Android apk. Falling back to creating debug apk.
castle-engine: Warning: Icon: No icon in a format readable by our engine (for example, png or jpg) is specified in CastleEngineManifest.xml. Using default icon.
Generated CastleDataInformation.xml.
Project data contains 6 directories, 22 files, total (uncompressed) size 3.76 MB.
process_begin: CreateProcess(NULL, C:/Programs/adt-bundle-windows-x86/sdk/ndk-bundle/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -print-resource-dir, …) failed.
[armeabi-v7a] "Prebuilt ": “libopenal.so <= jni/armeabi-v7a/”
[armeabi-v7a] "Install ": “libopenal.so => jniLibs/armeabi-v7a/libopenal.so”
process_begin: CreateProcess(NULL, C:/Programs/adt-bundle-windows-x86/sdk/ndk-bundle/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./jniLibs/armeabi-v7a/libopenal.so, …) failed.
make (e=2): The system cannot find the file specified.
make: *** [jniLibs/armeabi-v7a/libopenal.so] Error 2
make: *** Deleting file `jniLibs/armeabi-v7a/libopenal.so’
Exception “Exception”:
Process “C:\Programs\adt-bundle-windows-x86\sdk\ndk-bundle\ndk-build.cmd” (absolute path “C:\Programs\adt-bundle-windows-x86\sdk\ndk-bundle\ndk-build.cmd”) failed with exit status 2
before doing it I did as it was advised in docs:
From
android-ndk-XXX/platforms/android-16/arch-arm/usr/lib/
copy all the files to<fpcupdeluxe>/cross/lib/arm-android
.