Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How to set up the FMOD audio library in Qt Creator for Android
QtWS25 Last Chance

How to set up the FMOD audio library in Qt Creator for Android

Scheduled Pinned Locked Moved Unsolved Game Development
44 Posts 5 Posters 7.5k 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.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by
    #1

    I downloaded the FMOD audio library for Android here: https://www.fmod.com/download#fmodengine

    67d423dc-9052-4452-a5e2-9ab85020e404-image.png

    I installed it:

    3d27bc51-fadb-4c4a-9082-bd9c66104294-image.png

    7e57f1b1-cf69-4ebb-892e-1a0261a4e3fe-image.png
    240717fd-0d89-4108-af20-a731fadd6604-image.png

    I tried to add it:

    INCLUDEPATH += "C:\Program Files\FMOD SoundSystem\FMOD Studio API Android\api\core\inc"
    
    LIBS += -L"C:\Program Files\FMOD SoundSystem\FMOD Studio API Android\api\core\lib\armeabi-v7a"
    LIBS += -lfmod
    

    But I have these errors:

    4d30531d-69d6-41d9-9b7d-57298c08eecd-image.png

    1 Reply Last reply
    1
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by
      #2

      I tried this:

      INCLUDEPATH += $$PWD/libs/fmod-2.2.16/inc
      
      contains(ANDROID_TARGET_ARCH, armeabi-v7a)
      {
          ANDROID_EXTRA_LIBS = \
          $$PWD/libs/fmod-2.2.16/lib/armeabi-v7a/libmapbox-gl.so
      }
      

      1aed894e-94ec-4239-b81a-6536172fe748-image.png

      45bdfcd8-e7b5-4241-9537-55a797eb7ee1-image.png

      5290bdac-04c5-48f4-8411-b772b7a2a40b-image.png

      71f76ed6-56b2-4ef5-a0b1-264226287e0f-image.png

      04c56214-b393-42e5-985c-d58ac677f509-image.png

      9939141a-2a62-448b-9213-065bece60ae2-image.png

      67ca964c-c4e6-4c80-9d45-c273e7cc18de-image.png

      1 Reply Last reply
      0
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by 8Observer8
        #3

        Sorry, I forgot to change the name of library to "libfmod.so". But the errors are the same. Qt doesn't see the "libfmod.so" library:

        7362cece-8857-462c-8a66-9e7a0fc0286b-image.png

        I try to build with armeabi-v7a for Release to build an APK and run it on a real smartphone:

        e4d0fc90-df54-4650-9292-727f89c500cd-image.png

        1 Reply Last reply
        0
        • 8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by 8Observer8
          #4

          The build process was finished without problems and the APK file was created with these settings:

          INCLUDEPATH += $$PWD/libs/fmod-2.2.16/inc
          
          contains(ANDROID_TARGET_ARCH, armeabi-v7a)
          {
              LIBS += $$PWD/libs/fmod-2.2.16/lib/armeabi-v7a/libfmod.so
          }
          

          But when I run it on real smartphone the app was crashed. Why? What should I try?

          I built this example for Desktop before and it works without crash. Music played.

          1 Reply Last reply
          0
          • 8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by 8Observer8
            #5

            I found this answer here: https://stackoverflow.com/questions/47170950/qt-creator-and-android-run-on-emulator-but-crash-on-hardware-device

            Finally after much digging.

            The compiler used with QtCreator generates armeabi-v7a lib files.

            Those files are included into the /libs/ folder on the apk.

            Our project required to use some other external libs that were also compiled for other architectures. The folder /libs/ of the generated apk contained libs for those different architecture, but the main project was available only for the armeabi-v7a.

            Therefore the app would be started and try to find the lib to the preferred architecture and would crash right away.

            The solution is to force using only the available architecture.

            This is done by adding this to the build.gradle script

             defaultConfig {
                ndk {
                    abiFilters  'armeabi-v7a'
                }
            }
            

            But where should I add it?

            1 Reply Last reply
            0
            • 8Observer88 Offline
              8Observer88 Offline
              8Observer8
              wrote on last edited by 8Observer8
              #6

              I found where I should add it: C:\Qt\6.2.4\android_armv7\src\android\templates\build.gradle

              I add it to build.gradle here:

                  defaultConfig {
                      resConfig "en"
                      minSdkVersion qtMinSdkVersion
                      targetSdkVersion qtTargetSdkVersion
                      ndk.abiFilters = qtTargetAbiList.split(",")
                      ndk {
                          abiFilters  'armeabi-v7a'
                      }
                  }
              

              But it did not help. The app is crashed on real smartphone.

              1 Reply Last reply
              0
              • 8Observer88 Offline
                8Observer88 Offline
                8Observer8
                wrote on last edited by 8Observer8
                #7

                I tried to rerun Qt and delete the old build to APK. But it did not help.

                But I opened a report of MIUI about errors on smartphone:

                java.lang.UnsatisfiedLinkError: dlopen failed: library "libfmod.so" not found
                at java.lang.Runtime.load0(Runtime.java: 908)
                at java.lang.System.load(System.java: 1537)
                at org.qtproject.qt.android.QtNative$4.run(QtNative.java:536)
                at org.qtproject.qt.android.QtThread$2.run(QtThread.java:87)
                at org.qtproject.qt.android.QtThread$1.run(QtThread.java:61)
                at java.lang.Thread.run(Thread.java:760)

                1 Reply Last reply
                0
                • 8Observer88 Offline
                  8Observer88 Offline
                  8Observer8
                  wrote on last edited by 8Observer8
                  #8

                  I changed LIBS to ANDROID_EXTRA_LIBS like here: https://www.qtcentre.org/threads/60779-Using-3rd-part-static-library-with-QT-Creator-in-Win7?p=269120#post269120

                  Since you're linking dynamically against libusb you need to deploy the library with your application. You can use ANDROID_EXTRA_LIBS to achieve that.

                  Have a look at the documentation: http://qt-project.org/doc/qt-5/deployment-android.html

                  contains(ANDROID_TARGET_ARCH, armeabi-v7a)
                  {
                      ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libfmod.so
                  }
                  

                  Now I have another errors after a crash on the real device:


                  Build fingerprint: 'Xiaomi/santoni/santoni:7.1.2/N2G47H/9.6.27:user/release-keys'
                  Revision: '0'
                  ABI: 'arm'
                  pid: 11662, tid: 11682, name: qtMainLoopThrea >>> org.qtproject.example.fmode_2d_qt6_cpp <<<
                  signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
                  Abort message: 'art/runtime/java_vm_ext.cc:475] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn't find class "org.fmod.AudioDevice" on path: DexPathList[[zip file "/data/app/org.qtproject.example.fmode_2d_qt6_cpp-1/base.apk"],nativeLibraryDirectories=[/data/app/org.qtproject.example.fmode_2d_qt6_cpp-1/lib/arm, /data/app/org.qtproject.example.fmode_2d_qt6_cpp-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]'
                  r0 00000000 r1 00002da2 r2 00000006 r3 00000008
                  r4 c7780978 r5 00000006 r6 c7780920 r7 0000010c
                  r8 00000000 r9 0000000a sl 00000fbd fp da07b900
                  ip 0000000b sp c777f610 lr e843f2d7 pc e8441b58 cpsr 200f0010

                  backtrace:
                  #00 pc 00049b58 /system/lib/libc.so (tgkill+12)
                  #01 pc 000472d3 /system/lib/libc.so (pthread_kill+34)
                  #02 pc 0001d575 /system/lib/libc.so (raise+10)
                  #03 pc 000190c1 /system/lib/libc.so (__libc_android_abort+34)
                  #04 pc 00017124 /system/lib/libc.so (abort+4)
                  #05 pc 0031c3d9 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+328)
                  #06 pc 000b569d /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1132)
                  #07 pc 0023ab55 /system/lib/libart.so (ZN3art9JavaVMExt8JniAbortEPKcS2+1664)
                  #08 pc 0023ad47 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+58)
                  #09 pc 000cb09b /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+46)
                  #10 pc 000cac87 /system/lib/libart.so (_ZN3art11ScopedCheck11CheckThreadEP7_JNIEnv+362)
                  #11 pc 000c9c9f /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+26)
                  #12 pc 000c917b /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+802)
                  #13 pc 000cbe49 /system/lib/libart.so (_ZN3art8CheckJNI6NewRefEPKcP7_JNIEnvP8_jobjectNS_15IndirectRefKindE+452)
                  #14 pc 003382fd /system/lib/libart.so (_ZN3art6Thread22SetClassLoaderOverrideEP8_jobject+32)
                  #15 pc 0023c857 /system/lib/libart.so (ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectP8_jstringPS9+1878)
                  #16 pc 00003167 /system/lib/libopenjdkjvm.so (JVM_NativeLoad+178)
                  #17 pc 00584c6d /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Runtime.nativeLoad+144)
                  #18 pc 005848ad /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Runtime.doLoad+136)
                  #19 pc 005859dd /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Runtime.load0+368)
                  #20 pc 0059e383 /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.System.load+78)
                  #21 pc 000a9b41 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
                  #22 pc 00406ff5 /system/lib/libart.so (art_quick_invoke_static_stub+228)
                  #23 pc 000b0dff /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+178)
                  #24 pc 001edfed /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+200)
                  #25 pc 001e859d /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+492)
                  #26 pc 003ffaf9 /system/lib/libart.so (MterpInvokeStatic+236)
                  #27 pc 0009cb14 /system/lib/libart.so (ExecuteMterpImpl+14612)
                  #28 pc 001cb8c7 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+286)
                  #29 pc 001d042f /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
                  #30 pc 001e8583 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
                  #31 pc 003ff61b /system/lib/libart.so (MterpInvokeInterface+834)
                  #32 pc 0009cb94 /system/lib/libart.so (ExecuteMterpImpl+14740)
                  #33 pc 001cb8c7 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+286)
                  #34 pc 001d042f /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
                  #35 pc 001e8583 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
                  #36 pc 003ff61b /system/lib/libart.so (MterpInvokeInterface+834)
                  #37 pc 0009cb94 /system/lib/libart.so (ExecuteMterpImpl+14740)
                  #38 pc 001cb8c7 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+286)
                  #39 pc 001d0399 /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+92)
                  #40 pc 003f63e7 /system/lib/libart.so (artQuickToInterpreterBridge+706)
                  #41 pc 000ae593 /system/lib/libart.so (art_quick_to_interpreter_bridge+34)
                  #42 pc 005a22e9 /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Thread.run+52)
                  #43 pc 000a9b41 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
                  #44 pc 00406eed /system/lib/libart.so (art_quick_invoke_stub+232)
                  #45 pc 000b0dd5 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+136)
                  #46 pc 00317349 /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+56)
                  #47 pc 00318115 /system/lib/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+256)
                  #48 pc 0032f29d /system/lib/libart.so (_ZN3art6Thread14CreateCallbackEPv+848)
                  #49 pc 00046da3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
                  #50 pc 00019b0d /system/lib/libc.so (__start_thread+6)

                  JoeCFDJ 1 Reply Last reply
                  0
                  • 8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote on last edited by 8Observer8
                    #9

                    I have created a few topics:

                    • Official FMOD forum: https://qa.fmod.com/t/qt-application-with-fmod-audio-library-crashes-on-launch-on-android/20561
                    • Stack Overflow: https://stackoverflow.com/questions/76928386/qt-application-with-fmod-audio-library-crashes-on-launch-on-android
                    • Qt Centre: https://www.qtcentre.org/threads/63390-Adding-external-library-into-Qt-Android-project
                    1 Reply Last reply
                    0
                    • 8Observer88 8Observer8

                      I changed LIBS to ANDROID_EXTRA_LIBS like here: https://www.qtcentre.org/threads/60779-Using-3rd-part-static-library-with-QT-Creator-in-Win7?p=269120#post269120

                      Since you're linking dynamically against libusb you need to deploy the library with your application. You can use ANDROID_EXTRA_LIBS to achieve that.

                      Have a look at the documentation: http://qt-project.org/doc/qt-5/deployment-android.html

                      contains(ANDROID_TARGET_ARCH, armeabi-v7a)
                      {
                          ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libfmod.so
                      }
                      

                      Now I have another errors after a crash on the real device:


                      Build fingerprint: 'Xiaomi/santoni/santoni:7.1.2/N2G47H/9.6.27:user/release-keys'
                      Revision: '0'
                      ABI: 'arm'
                      pid: 11662, tid: 11682, name: qtMainLoopThrea >>> org.qtproject.example.fmode_2d_qt6_cpp <<<
                      signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
                      Abort message: 'art/runtime/java_vm_ext.cc:475] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn't find class "org.fmod.AudioDevice" on path: DexPathList[[zip file "/data/app/org.qtproject.example.fmode_2d_qt6_cpp-1/base.apk"],nativeLibraryDirectories=[/data/app/org.qtproject.example.fmode_2d_qt6_cpp-1/lib/arm, /data/app/org.qtproject.example.fmode_2d_qt6_cpp-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]'
                      r0 00000000 r1 00002da2 r2 00000006 r3 00000008
                      r4 c7780978 r5 00000006 r6 c7780920 r7 0000010c
                      r8 00000000 r9 0000000a sl 00000fbd fp da07b900
                      ip 0000000b sp c777f610 lr e843f2d7 pc e8441b58 cpsr 200f0010

                      backtrace:
                      #00 pc 00049b58 /system/lib/libc.so (tgkill+12)
                      #01 pc 000472d3 /system/lib/libc.so (pthread_kill+34)
                      #02 pc 0001d575 /system/lib/libc.so (raise+10)
                      #03 pc 000190c1 /system/lib/libc.so (__libc_android_abort+34)
                      #04 pc 00017124 /system/lib/libc.so (abort+4)
                      #05 pc 0031c3d9 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+328)
                      #06 pc 000b569d /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1132)
                      #07 pc 0023ab55 /system/lib/libart.so (ZN3art9JavaVMExt8JniAbortEPKcS2+1664)
                      #08 pc 0023ad47 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+58)
                      #09 pc 000cb09b /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+46)
                      #10 pc 000cac87 /system/lib/libart.so (_ZN3art11ScopedCheck11CheckThreadEP7_JNIEnv+362)
                      #11 pc 000c9c9f /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+26)
                      #12 pc 000c917b /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+802)
                      #13 pc 000cbe49 /system/lib/libart.so (_ZN3art8CheckJNI6NewRefEPKcP7_JNIEnvP8_jobjectNS_15IndirectRefKindE+452)
                      #14 pc 003382fd /system/lib/libart.so (_ZN3art6Thread22SetClassLoaderOverrideEP8_jobject+32)
                      #15 pc 0023c857 /system/lib/libart.so (ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectP8_jstringPS9+1878)
                      #16 pc 00003167 /system/lib/libopenjdkjvm.so (JVM_NativeLoad+178)
                      #17 pc 00584c6d /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Runtime.nativeLoad+144)
                      #18 pc 005848ad /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Runtime.doLoad+136)
                      #19 pc 005859dd /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Runtime.load0+368)
                      #20 pc 0059e383 /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.System.load+78)
                      #21 pc 000a9b41 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
                      #22 pc 00406ff5 /system/lib/libart.so (art_quick_invoke_static_stub+228)
                      #23 pc 000b0dff /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+178)
                      #24 pc 001edfed /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+200)
                      #25 pc 001e859d /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+492)
                      #26 pc 003ffaf9 /system/lib/libart.so (MterpInvokeStatic+236)
                      #27 pc 0009cb14 /system/lib/libart.so (ExecuteMterpImpl+14612)
                      #28 pc 001cb8c7 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+286)
                      #29 pc 001d042f /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
                      #30 pc 001e8583 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
                      #31 pc 003ff61b /system/lib/libart.so (MterpInvokeInterface+834)
                      #32 pc 0009cb94 /system/lib/libart.so (ExecuteMterpImpl+14740)
                      #33 pc 001cb8c7 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+286)
                      #34 pc 001d042f /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114)
                      #35 pc 001e8583 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466)
                      #36 pc 003ff61b /system/lib/libart.so (MterpInvokeInterface+834)
                      #37 pc 0009cb94 /system/lib/libart.so (ExecuteMterpImpl+14740)
                      #38 pc 001cb8c7 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+286)
                      #39 pc 001d0399 /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+92)
                      #40 pc 003f63e7 /system/lib/libart.so (artQuickToInterpreterBridge+706)
                      #41 pc 000ae593 /system/lib/libart.so (art_quick_to_interpreter_bridge+34)
                      #42 pc 005a22e9 /system/framework/arm/boot.oat (offset 0x51c000) (java.lang.Thread.run+52)
                      #43 pc 000a9b41 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
                      #44 pc 00406eed /system/lib/libart.so (art_quick_invoke_stub+232)
                      #45 pc 000b0dd5 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+136)
                      #46 pc 00317349 /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+56)
                      #47 pc 00318115 /system/lib/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+256)
                      #48 pc 0032f29d /system/lib/libart.so (_ZN3art6Thread14CreateCallbackEPv+848)
                      #49 pc 00046da3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
                      #50 pc 00019b0d /system/lib/libc.so (__start_thread+6)

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

                      @8Observer8 said in How to set up the FMOD audio library in Qt Creator for Android:

                      ANDROID_EXTRA_LIBS

                      I guess
                      if your app is built with Qt6, use QT_ANDROID_EXTRA_LIBS.
                      Use ANDROID_EXTRA_LIBS for Qt5

                      How do I view the contents of an APK file?

                      APK files are saved in a compressed .ZIP format and can be opened by any Zip decompression tool. Therefore, if you would like to explore the contents of an APK file, you can rename the file extension to ".zip" and open the file, or you can open the file directly through a Zip application's open dialog box.

                      Open or list your apk file to make sure these libs are added in.

                      Try the latest Qt6 if you prefer Qt6. Qt-6.2 is new in Qt 6.
                      I would prefer to use Qt5 for this. Especially your Android version is so old.

                      8Observer88 3 Replies Last reply
                      0
                      • JoeCFDJ JoeCFD

                        @8Observer8 said in How to set up the FMOD audio library in Qt Creator for Android:

                        ANDROID_EXTRA_LIBS

                        I guess
                        if your app is built with Qt6, use QT_ANDROID_EXTRA_LIBS.
                        Use ANDROID_EXTRA_LIBS for Qt5

                        How do I view the contents of an APK file?

                        APK files are saved in a compressed .ZIP format and can be opened by any Zip decompression tool. Therefore, if you would like to explore the contents of an APK file, you can rename the file extension to ".zip" and open the file, or you can open the file directly through a Zip application's open dialog box.

                        Open or list your apk file to make sure these libs are added in.

                        Try the latest Qt6 if you prefer Qt6. Qt-6.2 is new in Qt 6.
                        I would prefer to use Qt5 for this. Especially your Android version is so old.

                        8Observer88 Offline
                        8Observer88 Offline
                        8Observer8
                        wrote on last edited by 8Observer8
                        #11

                        @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                        How do I view the contents of an APK file?

                        You can download it here: https://www.dropbox.com/scl/fi/m7hk76cia49451mhsoiny/android-build-with-fmod-for-forums.apk?rlkey=h2cnav1e6bl7s3ixidqi4nnsf&dl=1

                        Could you try to run it on your smartphone?

                        1 Reply Last reply
                        0
                        • JoeCFDJ JoeCFD

                          @8Observer8 said in How to set up the FMOD audio library in Qt Creator for Android:

                          ANDROID_EXTRA_LIBS

                          I guess
                          if your app is built with Qt6, use QT_ANDROID_EXTRA_LIBS.
                          Use ANDROID_EXTRA_LIBS for Qt5

                          How do I view the contents of an APK file?

                          APK files are saved in a compressed .ZIP format and can be opened by any Zip decompression tool. Therefore, if you would like to explore the contents of an APK file, you can rename the file extension to ".zip" and open the file, or you can open the file directly through a Zip application's open dialog box.

                          Open or list your apk file to make sure these libs are added in.

                          Try the latest Qt6 if you prefer Qt6. Qt-6.2 is new in Qt 6.
                          I would prefer to use Qt5 for this. Especially your Android version is so old.

                          8Observer88 Offline
                          8Observer88 Offline
                          8Observer8
                          wrote on last edited by 8Observer8
                          #12

                          @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                          Try the latest Qt6 if you prefer Qt6. Qt-6.2 is new in Qt 6.

                          Sorry. I forgot to write what I use. I use: FMODE 2.02.16 API version, JDK 17, NDK 22, Qt 6.2.4, and Redmi 4x (Android 7)

                          1 Reply Last reply
                          0
                          • JoeCFDJ JoeCFD

                            @8Observer8 said in How to set up the FMOD audio library in Qt Creator for Android:

                            ANDROID_EXTRA_LIBS

                            I guess
                            if your app is built with Qt6, use QT_ANDROID_EXTRA_LIBS.
                            Use ANDROID_EXTRA_LIBS for Qt5

                            How do I view the contents of an APK file?

                            APK files are saved in a compressed .ZIP format and can be opened by any Zip decompression tool. Therefore, if you would like to explore the contents of an APK file, you can rename the file extension to ".zip" and open the file, or you can open the file directly through a Zip application's open dialog box.

                            Open or list your apk file to make sure these libs are added in.

                            Try the latest Qt6 if you prefer Qt6. Qt-6.2 is new in Qt 6.
                            I would prefer to use Qt5 for this. Especially your Android version is so old.

                            8Observer88 Offline
                            8Observer88 Offline
                            8Observer8
                            wrote on last edited by
                            #13

                            @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                            Open or list your apk file to make sure these libs are added in.

                            Yes, libfmod.so is there. But How to make sure that the path is corrent?

                            624f4307-5d49-4111-ba92-438ce6df3815-image.png

                            JoeCFDJ 1 Reply Last reply
                            0
                            • 8Observer88 8Observer8

                              @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                              Open or list your apk file to make sure these libs are added in.

                              Yes, libfmod.so is there. But How to make sure that the path is corrent?

                              624f4307-5d49-4111-ba92-438ce6df3815-image.png

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

                              @8Observer8 they are all together. No path issue here.

                              8Observer88 2 Replies Last reply
                              0
                              • JoeCFDJ JoeCFD

                                @8Observer8 they are all together. No path issue here.

                                8Observer88 Offline
                                8Observer88 Offline
                                8Observer8
                                wrote on last edited by
                                #15

                                @JoeCFD please, try to run it

                                JoeCFDJ 1 Reply Last reply
                                0
                                • JoeCFDJ JoeCFD

                                  @8Observer8 they are all together. No path issue here.

                                  8Observer88 Offline
                                  8Observer88 Offline
                                  8Observer8
                                  wrote on last edited by 8Observer8
                                  #16

                                  @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                                  they are all together. No path issue here.

                                  I mean, maybe Qt try to find it on the wrong path that I wrote in pro-file. I found somewhere that the folder must be named jniLibs:

                                  contains(ANDROID_TARGET_ARCH, armeabi-v7a)
                                  {
                                      ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libfmod.so
                                  }
                                  
                                  1 Reply Last reply
                                  0
                                  • 8Observer88 Offline
                                    8Observer88 Offline
                                    8Observer8
                                    wrote on last edited by
                                    #17

                                    I tried to use lib instead of jniLibs but the result is the same.

                                    contains(ANDROID_TARGET_ARCH, armeabi-v7a)
                                    {
                                        ANDROID_EXTRA_LIBS += $$PWD/lib/armeabi-v7a/libfmod.so
                                    }
                                    
                                    1 Reply Last reply
                                    0
                                    • 8Observer88 8Observer8

                                      @JoeCFD please, try to run it

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

                                      @8Observer8 Very few people have phones with Android 7.

                                      8Observer88 1 Reply Last reply
                                      0
                                      • JoeCFDJ JoeCFD

                                        @8Observer8 Very few people have phones with Android 7.

                                        8Observer88 Offline
                                        8Observer88 Offline
                                        8Observer8
                                        wrote on last edited by
                                        #19

                                        @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                                        Very few people have phones with Android 7.

                                        I think the smaller the version, the more you can capture the audience. Let's say if you build for Android 4, then the application will run on Android 4, 5, 6, 7, 8, 9, 10, 11 and so on. But if you build on the latest version of Android, then the audience will be very small.

                                        JoeCFDJ 1 Reply Last reply
                                        0
                                        • 8Observer88 8Observer8

                                          @JoeCFD said in How to set up the FMOD audio library in Qt Creator for Android:

                                          Very few people have phones with Android 7.

                                          I think the smaller the version, the more you can capture the audience. Let's say if you build for Android 4, then the application will run on Android 4, 5, 6, 7, 8, 9, 10, 11 and so on. But if you build on the latest version of Android, then the audience will be very small.

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

                                          @8Observer8 then you need to add the support up to Android 13. Did you do it? Or you simply made Android 7 support?

                                          my app supports Android 11, 12 and 13.

                                          8Observer88 2 Replies 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