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 Build Qt SDL Application in Android ?
Forum Updated to NodeBB v4.3 + New Features

How To Build Qt SDL Application in Android ?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 371 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.
  • N Offline
    N Offline
    nivedha_02
    wrote on 18 Dec 2020, 11:03 last edited by
    #1

    Following are the Android Settings used :
    NDK - android-ndk-r10e
    SDK - 26.1.1
    JDK - 1.8
    API level - Android-16 and Android -17
    ABI - armeabiV7a

    Following are the procedure followed :

    1. Download SDL2 source code and extract 'android-project' folder from it and renamed it to the name of my project.
      2 . Create a symbolic link of SDL2 as ./SDL inside 'app' folder.
    2. Modify 'Android.mk' with the name of the source file in 'LOCAL_SRC_FILES' and set CFLAGS.
    3. Run ndk-build from jni > src folder and on successful build libsdl.so and libmain.so is generated.
    4. Include these .so files in qt pro file under 'ANDROID_EXTRA_LIBS'.
    5. clean , qmake , build was successful.
    6. On Running the application with same source code as mentioned in Android.mk , following error was displayed and the application got crashed :

    D/dalvikvm( 1431): Trying to load lib /data/data/org.qtproject.example.testSdlQt/lib/libtestSdlQt.so 0x9f0113c8
    D/dalvikvm( 1431): Added shared lib /data/data/org.qtproject.example.testSdlQt/lib/libtestSdlQt.so 0x9f0113c8
    D/dalvikvm( 1431): No JNI_OnLoad found in /data/data/org.qtproject.example.testSdlQt/lib/libtestSdlQt.so 0x9f0113c8, skipping init
    E/ ( 1431): dlsym failed: Symbol not found:
    E/ ( 1431): Could not find main method
    F/libc ( 1431): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 1450 (qtMainLoopThrea)
    I/DEBUG ( 651): pid: 1431, tid: 1450, name: qtMainLoopThrea >>> org.qtproject.example.testSdlQt <<<
    D/Zygote ( 654): Process 1431 terminated by signal (11)
    I/ActivityManager( 837): Process org.qtproject.example.testSdlQt (pid 1431) has died.
    "org.qtproject.example.testSdlQt" died.

    1 Reply Last reply
    0

    1/1

    18 Dec 2020, 11:03

    • Login

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