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. How to add libpng16.so to .apk ?
Forum Updated to NodeBB v4.3 + New Features

How to add libpng16.so to .apk ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 525 Views
  • 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.
  • M Offline
    M Offline
    maris
    wrote on last edited by
    #1

    I need libpng
    I build libpng and have files libpng16.so libpng.so

    I create application for android and add png to cmake

    if(ANDROID)
    	include_directories(
    		${CMAKE_SOURCE_DIR}/3rdparty/Android/include
    	)
    	link_directories(
    		${CMAKE_SOURCE_DIR}/3rdparty/Android/lib
    	)
    endif()
    target_link_libraries(myAPP PRIVATE Qt${QT_VERSION_MAJOR}::Widgets png)
    

    compiler build CORRECT
    linker link target file CORRECT

    But after run i have

    E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread
    E AndroidRuntime: Process: org.qtproject.example.myAPP , PID: 14799
    E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libpng16.so" not found
    

    How to add my libpng16.so to APK ?

    1 Reply Last reply
    0
    • cristian-adamC Online
      cristian-adamC Online
      cristian-adam
      wrote on last edited by
      #2

      See https://doc.qt.io/qt-6/cmake-target-property-qt-android-extra-libs.html

      1 Reply Last reply
      1
      • M maris has marked this topic as solved on
      • M Offline
        M Offline
        maris
        wrote on last edited by
        #3

        @cristian-adam Thank you very much

        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