My setup:
- Lazarus 2.0.12 + cross-x86_64-win64-win32 + cross-arm-wince-win32
- fpc-3.2.0.i386-win32.cross.android
- LAMW (downloaded from github 2024-06-07)
- Gradle 8.7
- Android commandlinetools-win-7583922 / SDK 34
- NDK r21e
- JDK win x86 64-bit, Java 21 (LTS)
All successfully installed, I can create new LAMW GUI project, it builds APK (usually...) and runs in Android Device.
However, when I try to build and run any demo, it fails on "Building APK (Gradle)" with message "Manifest merger failed". I have already changed Chipset to ARMv7a+VFPv3 in Project Options. How can I fix this?
Messages, Hints: 2
Verbose: Selected chip architecture: armeabi
Verbose: Taking libraries from folder: D:\LazarusAndroidTools\lazandroidmodulewizard-master\demos\GUI\AppClockDemo1\libs\armeabi
Note: Duplicate unit "controls" in "controls", orphaned ppu "D:\LazarusAndroidTools\lazandroidmodulewizard-master\demos\GUI\AppClockDemo1\obj\controls\controls.o"
Note: Duplicate unit "controls" in "LCLBase 2.0.12", ppu="C:\lazarus\lcl\units\arm-android\controls.ppu", source="C:\lazarus\lcl\controls.pp"
Compile Project, OS: android, CPU: arm, Target: D:\LazarusAndroidTools\lazandroidmodulewizard-master\demos\GUI\AppClockDemo1\libs\armeabi-v7a\libcontrols.so: Success
Building APK (Gradle)... : FAILURE: Build failed with an exception., Errors: 1
Fatal: FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugMainManifest'.
> Manifest merger failed : android:exported needs to be explicitly specified for element <activity#com.example.appclockdemo1.App>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 1s
15 actionable tasks: 14 executed, 1 up-to-date
Watched directory hierarchies: [D:\LazarusAndroidTools\lazandroidmodulewizard-master\demos\GUI\AppClockDemo1, D:\LazarusAndroidProjects\AppLAMWProject1]
Exception, Errors: 1
Fatal: [Exception] Failed: Cannot build APK!