<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[third party libraries were not packed in apk file in QT android]]></title><description><![CDATA[<p dir="auto">Hi ,<br />
I am using QT6 to develop a android app which needs some third party libraries,  compiling the project is OK, but I found that the third party libraries were not packed in apk file. I opened the project menu in which I found that the addtioal libraries was gray and I could not add a third party library.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/1b85adbc-a8e3-4dbf-984d-e78d21ae9f3d.png" alt="16868790907878.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">and I configured the cmake file as below.<br />
find_library(log-lib log)<br />
find_library(EGL EGL)<br />
find_library(GLESv2 GLESv2)<br />
find_library(android android)</p>
<p dir="auto">add_library(avcodec SHARED IMPORTED)<br />
set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libavcodec.so)</p>
<p dir="auto">add_library(avfilter SHARED IMPORTED)<br />
set_target_properties(avfilter PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libavfilter.so)</p>
<p dir="auto">add_library(avformat SHARED IMPORTED)<br />
set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libavformat.so)</p>
<p dir="auto">add_library(avutil SHARED IMPORTED)<br />
set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libavutil.so)</p>
<p dir="auto">add_library(swresample SHARED IMPORTED)<br />
set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libswresample.so)</p>
<p dir="auto">add_library(swscale SHARED IMPORTED)<br />
set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libswscale.so)</p>
<p dir="auto">add_library(SDL2 SHARED IMPORTED)<br />
set_target_properties(SDL2 PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libSDL2.so)</p>
<p dir="auto">#add_library(EGL SHARED IMPORTED)<br />
#set_target_properties(EGL PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libEGL.so)</p>
<p dir="auto">#add_library(GLESv2 SHARED IMPORTED)<br />
#set_target_properties(GLESv2 PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libGLESv2.so)</p>
<p dir="auto">#add_library(android SHARED IMPORTED)<br />
#set_target_properties(android PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/armeabi-v7a/libandroid.so)</p>
<p dir="auto">target_link_libraries(andriodTest2<br />
PRIVATE Qt${QT_VERSION_MAJOR}::Widgets<br />
# log<br />
${log-lib}</p>
<pre><code>    EGL
    GLESv2
    android

    # FFmpeg libs
    avcodec
    avfilter
    avformat
    avutil
    swresample
    swscale
    SDL2
</code></pre>
<p dir="auto">)</p>
<p dir="auto">can someone help figure out how to fix this?</p>
]]></description><link>https://forum.qt.io/topic/145808/third-party-libraries-were-not-packed-in-apk-file-in-qt-android</link><generator>RSS for Node</generator><lastBuildDate>Thu, 22 Oct 2026 20:50:22 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145808.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Jun 2023 01:40:55 GMT</pubDate><ttl>60</ttl></channel></rss>