@DonLakeFlyer
Trying to compile a custom build for android from a daily downloaded yesterday on a Mac M1. Regular QGC builds and runs correctly in QT.
Followed each step in the readme for the custom build:
Clean you build directory of any previous build
Rename the directory from custom-example
to custom
Change to the custom
directory
Run python updateqrc.py
I run the command with python3 and got following output:
“Excluded: file alias=“QGroundControl/FlightDisplay/FlyViewCustomLayer.qml”>src/FlightDisplay/FlyViewCustomLayer.qml/file”
Build QGC
Got the following error:
sed: 1: “/Users/corrado/QGC/qgro …”: command c expects \ followed by text
make: *** [Makefile:2061: android_source_dir] Error 1
the line in makefile is the following and it is in red:
“s/package=“org.mavlink.qgroundcontrol”/package=“org.custom.qgroundcontrol”/”
I do all the steps in readme than I rebuild qgroundcontrol project in QT, maybe I didn’t fully understand what I should build.
any help would be greatly appreciated.
EDIT Tried building from stable 4.2 and same error.
I solved the issue as described here but don’t know if it is ok or I am missing something:
opened 03:32PM - 20 Oct 21 UTC
Bug
## Expected Behavior
When building on android, complete the make step
## Cur… rent Behavior
When building on android, the application fails at the "make" step
## Steps to Reproduce:
Please provide an unambiguous set of steps to reproduce the current behavior
1. Rename the folder from "custom-example" to "custom"
2. Run the updateqrc.py in the custom folder
3. Change configuration in Qt Creator to Android - Debug
4. Hit the build button
## System Information
When posting bug reports, include the following information
- Operating System: Windows 10
- QGC Version: 4.1.4
- QGC build: Daily
- Flight Controller: Pixhawk 1
- Autopilot (with version): PX4 1.12.1
## Detailed Description
After forking the the Mavlink QGC repo, Qt Creator will build an apk for Android before making any changes. After going through the steps to make it custom (i.e. the readme steps), you are no longer able to build the apk.
## Log Files and Screenshots
This is the error message:
`11:17:45: Starting: "C:\Users\admin\AppData\Local\Android\Sdk\ndk\22.1.7171670\prebuilt\windows-x86_64\bin\make.exe" -j16
C:/Users/admin/AppData/Local/Android/Sdk/ndk/22.1.7171670/prebuilt/windows-x86_64/bin/make.exe -f Makefile.Armeabi-v7a all
C:/Users/admin/AppData/Local/Android/Sdk/ndk/22.1.7171670/prebuilt/windows-x86_64/bin/make.exe -f Makefile.Arm64-v8a all
make[1]: Entering directory 'C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug'
mkdir C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR && xcopy /s /q /y /i C:/Users/admin/Documents/GitHub/inspiredflight/android/* C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR && xcopy /s /q /y /i C:/Users/admin/Documents/GitHub/inspiredflight/custom/android/* C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR && C:\Qt\5.15.2\android\bin\qmake.exe -install sed -i "s/package=\"org.mavlink.qgroundcontrol\"/package=\"org.custom.qgroundcontrol\"/" C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR/AndroidManifest.xml
make[1]: Entering directory 'C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug'
mkdir C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR && xcopy /s /q /y /i C:/Users/admin/Documents/GitHub/inspiredflight/android/* C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR && xcopy /s /q /y /i C:/Users/admin/Documents/GitHub/inspiredflight/custom/android/* C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR && C:\Qt\5.15.2\android\bin\qmake.exe -install sed -i "s/package=\"org.mavlink.qgroundcontrol\"/package=\"org.custom.qgroundcontrol\"/" C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/ANDROID_PACKAGE_SOURCE_DIR/AndroidManifest.xml
The syntax of the command is incorrect.
The syntax of the command is incorrect.
make[1]: *** [Makefile.Armeabi-v7a:1709: android_source_dir] Error 1
make[1]: *** [Makefile.Arm64-v8a:1709: android_source_dir] Error 1
make[1]: Leaving directory 'C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug'
make[1]: Leaving directory 'C:/Users/admin/Documents/GitHub/build-qgroundcontrol-Android_Qt_5_15_2_Clang_Multi_Abi-Debug'
make: *** [Makefile:46: armeabi-v7a-all] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Makefile:60: arm64-v8a-all] Error 2
11:17:47: The process "C:\Users\admin\AppData\Local\Android\Sdk\ndk\22.1.7171670\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
Error while building/deploying project qgroundcontrol (kit: Android Qt 5.15.2 Clang Multi-Abi)
When executing step "Make"`