Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can not build Android project in Windows 10

Can not build Android project in Windows 10

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sailord
    wrote on last edited by
    #1

    Im having problems trying to build a new android project in Qt. I created a new Qt Widget Application.
    When i try to compile the project i get this compile message:

    07:37:39: Running steps for project test...
    07:37:39: Starting: "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" clean
    rm -f moc_MainWindow.cpp
    Makefile:409: recipe for target 'compiler_moc_header_clean' failed
    process_begin: CreateProcess(NULL, rm -f moc_MainWindow.cpp, ...) failed.
    make (e=2): The file can not be found.
    
    mingw32-make: [compiler_moc_header_clean] Error 2 (ignored)
    rm -f ui_MainWindow.h
    Makefile:822: recipe for target 'compiler_uic_clean' failed
    process_begin: CreateProcess(NULL, rm -f ui_MainWindow.h, ...) failed.
    make (e=2): The file can not be found.
    
    mingw32-make: [compiler_uic_clean] Error 2 (ignored)
    rm -f main.obj MainWindow.obj moc_MainWindow.obj
    Makefile:386: recipe for target 'clean' failed
    rm -f *~ core *.core
    process_begin: CreateProcess(NULL, rm -f main.obj MainWindow.obj moc_MainWindow.obj, ...) failed.
    make (e=2): The file can not be found.
    
    mingw32-make: [clean] Error 2 (ignored)
    07:37:39: The process "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    07:37:39: Configuration unchanged, skipping qmake step.
    07:37:39: Starting: "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" 
    mingw32-make: Nothing to be done for 'first'.
    07:37:40: The process "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    07:37:40: Removing directory D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/libs
    07:37:40: Starting: "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT=D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build" install
    
    cp -f libtest.so D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/libs/armeabi-v7a/libtest.so
    Makefile:1696: recipe for target 'install_target' failed
    process_begin: CreateProcess(NULL, cp -f libtest.so D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/libs/armeabi-v7a/libtest.so, ...) failed. make (e=2): The file can not be found.
    
    mingw32-make: [install_target] Error 2 (ignored)
    07:37:41: The process "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    07:37:41: Starting: "D:\Coding\Qt\5.7\android_armv7\bin\androiddeployqt.exe" --input D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-libtest.so-deployment-settings.json --output D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build --deployment bundled --android-platform android-25 --jdk D:/Coding/Java/jdk1.8.0_112 --gradle
    
    Generating Android Package
     Input file: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-libtest.so-deployment-settings.json
      Output directory: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/
      Application binary: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/libtest.so
      Android build platform: android-25
      Install to device: No
    Application binary is not in output directory: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build//libs/armeabi-v7a/libtest.so. Please run 'mingw32-make install INSTALL_ROOT=D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/' first.
    07:37:43: The process "D:\Coding\Qt\5.7\android_armv7\bin\androiddeployqt.exe" exited with code 7.
    Error while building/deploying project test (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))
    When executing step "Build Android APK"
    

    What am i doing wrong?

    Im using:
    Qt Creator 4.2.0
    Qt 5.7.1,
    Windows 10

    raven-worxR 1 Reply Last reply
    0
    • S sailord

      Im having problems trying to build a new android project in Qt. I created a new Qt Widget Application.
      When i try to compile the project i get this compile message:

      07:37:39: Running steps for project test...
      07:37:39: Starting: "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" clean
      rm -f moc_MainWindow.cpp
      Makefile:409: recipe for target 'compiler_moc_header_clean' failed
      process_begin: CreateProcess(NULL, rm -f moc_MainWindow.cpp, ...) failed.
      make (e=2): The file can not be found.
      
      mingw32-make: [compiler_moc_header_clean] Error 2 (ignored)
      rm -f ui_MainWindow.h
      Makefile:822: recipe for target 'compiler_uic_clean' failed
      process_begin: CreateProcess(NULL, rm -f ui_MainWindow.h, ...) failed.
      make (e=2): The file can not be found.
      
      mingw32-make: [compiler_uic_clean] Error 2 (ignored)
      rm -f main.obj MainWindow.obj moc_MainWindow.obj
      Makefile:386: recipe for target 'clean' failed
      rm -f *~ core *.core
      process_begin: CreateProcess(NULL, rm -f main.obj MainWindow.obj moc_MainWindow.obj, ...) failed.
      make (e=2): The file can not be found.
      
      mingw32-make: [clean] Error 2 (ignored)
      07:37:39: The process "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
      07:37:39: Configuration unchanged, skipping qmake step.
      07:37:39: Starting: "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" 
      mingw32-make: Nothing to be done for 'first'.
      07:37:40: The process "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
      07:37:40: Removing directory D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/libs
      07:37:40: Starting: "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT=D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build" install
      
      cp -f libtest.so D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/libs/armeabi-v7a/libtest.so
      Makefile:1696: recipe for target 'install_target' failed
      process_begin: CreateProcess(NULL, cp -f libtest.so D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/libs/armeabi-v7a/libtest.so, ...) failed. make (e=2): The file can not be found.
      
      mingw32-make: [install_target] Error 2 (ignored)
      07:37:41: The process "D:\Coding\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
      07:37:41: Starting: "D:\Coding\Qt\5.7\android_armv7\bin\androiddeployqt.exe" --input D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-libtest.so-deployment-settings.json --output D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build --deployment bundled --android-platform android-25 --jdk D:/Coding/Java/jdk1.8.0_112 --gradle
      
      Generating Android Package
       Input file: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-libtest.so-deployment-settings.json
        Output directory: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/
        Application binary: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/libtest.so
        Android build platform: android-25
        Install to device: No
      Application binary is not in output directory: D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build//libs/armeabi-v7a/libtest.so. Please run 'mingw32-make install INSTALL_ROOT=D:/Skrivbord/Project/build-test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/' first.
      07:37:43: The process "D:\Coding\Qt\5.7\android_armv7\bin\androiddeployqt.exe" exited with code 7.
      Error while building/deploying project test (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))
      When executing step "Build Android APK"
      

      What am i doing wrong?

      Im using:
      Qt Creator 4.2.0
      Qt 5.7.1,
      Windows 10

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @sailord
      you are using mingw compiler for building an android project?!
      Check your Android QtCreator settings. Escpeciall the NDK path.
      Also delete the .pro.user file (next to your .pro file) and restart QtCreator. Rerun qmake.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sailord
        wrote on last edited by
        #3

        @raven-worx
        Tested your suggestion, did not work.

        I have the path correctly set up to the Apache ant,Android sdk, Android ndk & the java f folder:
        D:\Coding\apache-ant-1.10.0\bin\ant.bat
        D:\Coding\Android\sdk
        D:\Coding\Android\ndk
        D:\Coding\Java\jdk1.8.0_112

        In the build & run projects it is set up like this:

        qmake: qmake.exe Test.pro -spec android-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
        Make: mingw32-make.exe in D:\Skrivbord\Project\build-Test-Android_for_armeabi_v7a_GCC_4_9_....
        Make install
        Build Android APK

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mvuori
          wrote on last edited by
          #4

          I think you have the same problem as:

          [https://forum.qt.io/topic/74378/mingw32-make-install_target-make-e-2-the-system-cannot-find-the-file-specified-windows-10-android](link url)

          1 Reply Last reply
          1
          • S Offline
            S Offline
            sailord
            wrote on last edited by
            #5

            @mvuori
            Thanks that worked.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved