mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.27k stars 3.6k forks source link

Not building on android after renaming custom-example to custom on Windows #9938

Closed samchurch-riis closed 4 months ago

samchurch-riis commented 3 years ago

Expected Behavior

When building on android, complete the make step

Current 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

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"

samchurch-riis commented 3 years ago

When commenting out these lines in android.pri, android is able to build and compile, however, I would like to know if there is a better fix image

louistHD commented 2 years ago

Any fix for this yet as I am facing the same issue?

samchurch-riis commented 2 years ago

When I commented out those lines above, it solved my issue

HTRamsey commented 2 years ago

@samchurch-riis #9932

DronecodeBot commented 1 year ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/what-is-this-android-build-error/32953/3