Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68488

Android application crash at startup when calling native function in activity onResume

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.11.0
    • Extras: Android
    • None

    Description

      I moved my Android application from 5.10.1 to 5.11 and now it crashes at startup.

      The crash occurs when calling a native method in my activity onResume(). 

      No implementation found for void qtTest.Natives.testNative() (tried Java_qtTest_Natives_testNative and Java_qtTest_Natives_testNative__)
      E AndroidRuntime: FATAL EXCEPTION: main
      E AndroidRuntime: Process: org.qtproject.example, PID: 9997
      E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for void qtTest.Natives.testNative() (tried Java_qtTest_Natives_testNative and Java_qtTest_Natives_testNative__)
      E AndroidRuntime: at qtTest.Natives.testNative(Native Method)
      

       Native methods in the rest of the code work.

       

       The attached code works fine with 5.10.1 but crashes with 5.11. If I comment

      Natives.testNative();

      in onResume(), then it works with 5.11.

       

      I looked at the changes between 5.10.1 and 5.11 and this was removed in QtLoader.java line 246. When I put it back in 5.11, then it works.

      // now load the application library so it's accessible from this class loader
       if (libName != null)
       System.loadLibrary(libName);

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              dydil Cyril Caillaba
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes