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. error trying to build for Android
Qt 6.11 is out! See what's new in the release blog

error trying to build for Android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 1.4k 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi all -

    Several months ago, I (successfully) built an app for Android. (It also runs on Windows, and eventually Linux.) I thought I kept complete notes on the steps necessary to do this, but I must have left something out, because I'm trying to create a new project for Android, and I'm getting this error when I try to build:

    :-1: error: Cannot find application binary in build dir C:/Users/Michael.Zimmers/Qt_projects/build-colors-Android_Qt_6_5_2_Clang_arm64_v8a-Release/android-build//libs/arm64-v8a/libappcolors_arm64-v8a.so.
    

    I guess I'm curious why the build would be looking for a .so file named after my project when it hasn't built anything yet.

    Thanks for any enlightenment...

    JoeCFDJ 1 Reply Last reply
    0
    • mzimmersM mzimmers

      @JoeCFD said in error trying to build for Android:

      Any other error or warning messages?

      No. And this message shows up immediately upon starting a build.

      I went through my first project makefile and didn't find much that had to do with Android; what I did find, I replicated in my new project:

      set( ANDROID_PACKAGE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/android CACHE INTERNAL "" )
      set_property(TARGET appcolors APPEND PROPERTY
          QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
      )
      

      So...I'm not really sure what to try next...

      mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by
      #4

      Well, for lack of anything else to try, I closed the project, manually deleted the build folders and my CMakeLists.txt.user file, and reconfigured. Now it works.

      Deus ex machina...

      1 Reply Last reply
      0
      • mzimmersM mzimmers

        Hi all -

        Several months ago, I (successfully) built an app for Android. (It also runs on Windows, and eventually Linux.) I thought I kept complete notes on the steps necessary to do this, but I must have left something out, because I'm trying to create a new project for Android, and I'm getting this error when I try to build:

        :-1: error: Cannot find application binary in build dir C:/Users/Michael.Zimmers/Qt_projects/build-colors-Android_Qt_6_5_2_Clang_arm64_v8a-Release/android-build//libs/arm64-v8a/libappcolors_arm64-v8a.so.
        

        I guess I'm curious why the build would be looking for a .so file named after my project when it hasn't built anything yet.

        Thanks for any enlightenment...

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #2

        @mzimmers said in error trying to build for Android:

        libappcolors_arm64-v8a.so

        I guess you build your app as .so(not executable) for Android. That dir is where your app so is located. If it is not found, that means your build failed.

        Any other error or warning messages?

        mzimmersM 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          @mzimmers said in error trying to build for Android:

          libappcolors_arm64-v8a.so

          I guess you build your app as .so(not executable) for Android. That dir is where your app so is located. If it is not found, that means your build failed.

          Any other error or warning messages?

          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by mzimmers
          #3

          @JoeCFD said in error trying to build for Android:

          Any other error or warning messages?

          No. And this message shows up immediately upon starting a build.

          I went through my first project makefile and didn't find much that had to do with Android; what I did find, I replicated in my new project:

          set( ANDROID_PACKAGE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/android CACHE INTERNAL "" )
          set_property(TARGET appcolors APPEND PROPERTY
              QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
          )
          

          So...I'm not really sure what to try next...

          mzimmersM 1 Reply Last reply
          0
          • mzimmersM mzimmers

            @JoeCFD said in error trying to build for Android:

            Any other error or warning messages?

            No. And this message shows up immediately upon starting a build.

            I went through my first project makefile and didn't find much that had to do with Android; what I did find, I replicated in my new project:

            set( ANDROID_PACKAGE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/android CACHE INTERNAL "" )
            set_property(TARGET appcolors APPEND PROPERTY
                QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
            )
            

            So...I'm not really sure what to try next...

            mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #4

            Well, for lack of anything else to try, I closed the project, manually deleted the build folders and my CMakeLists.txt.user file, and reconfigured. Now it works.

            Deus ex machina...

            1 Reply Last reply
            0
            • mzimmersM mzimmers has marked this topic as solved on

            • Login

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