Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9022949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:38:31+00:00 2026-06-16T05:38:31+00:00

My Android project is using an Android library project that has native code and

  • 0

My Android project is using an Android library project that has native code and I’m getting an UnsatisifiedLinkError from a native function that library uses.

I’ve included in the Android.mk file of my project these shared objects the library uses and they are correctly copied over to the /libs directory of the Eclipse project when I build and are present in the apks /lib directory when I run. The method not found should be in the libVuforiaTracking.so.

Here’s my Android.mk file:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := QCAR-prebuilt
LOCAL_SRC_FILES = ../../VuforiaTracking/libs/$(TARGET_ARCH_ABI)/libQCAR.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := VuforiaTracking-prebuilt
LOCAL_SRC_FILES = ../../VuforiaTracking/libs/$(TARGET_ARCH_ABI)/libVuforiaTracking.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := MyProject

# The list of shared libraries *modules* this module depends on at runtime.
# This is necessary at link time and to embed the corresponding information
# in the generated file. We reference the prebuilt library defined earlier 
# in this makefile.
LOCAL_SHARED_LIBRARIES := QCAR-prebuilt VuforiaTracking-prebuilt

#LOCAL_SRC_FILES := MyProject.cpp

# By default, ARM target binaries will be generated in 'thumb' mode, where
# each instruction are 16-bit wide. You can define this variable to 'arm'
# if you want to force the generation of the module's object files in
# 'arm' (32-bit instructions) mode
LOCAL_ARM_MODE := arm

include $(BUILD_SHARED_LIBRARY)

And here’s the log message:

12-21 09:53:48.220: E/AndroidRuntime(13086): FATAL EXCEPTION: main
12-21 09:53:48.220: E/AndroidRuntime(13086): java.lang.UnsatisfiedLinkError: Native method not found: com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity.getOpenGlEsVersionNative:()I
12-21 09:53:48.220: E/AndroidRuntime(13086):    at com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity.getOpenGlEsVersionNative(Native Method)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity.getInitializationFlags(VuforiaTrackingActivity.java:293)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity.onCreate(VuforiaTrackingActivity.java:282)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.Activity.performCreate(Activity.java:5191)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.os.Looper.loop(Looper.java:137)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at android.app.ActivityThread.main(ActivityThread.java:4898)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at java.lang.reflect.Method.invokeNative(Native Method)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at java.lang.reflect.Method.invoke(Method.java:511)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
12-21 09:53:48.220: E/AndroidRuntime(13086):    at dalvik.system.NativeStart.main(Native Method)

Is that the correct way to include shared objects of a library dependency?

Edit:

I noticed the package name says com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity and I should probably note that I’m subclassing this activity of the library in my project, so the package name of the actual activity would be different. Would this cause any problems when the JNI goes to look for a method named com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity.getOpenGlEsVersionNative() and my subclass is named com.my.package.MyActivity?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:38:32+00:00Added an answer on June 16, 2026 at 5:38 am

    The issue was that I changed the name of the class that used the native method to VuforiaTrackingActivity when the native method was called VuforiaTracking. So the shared objects were in fact loaded correctly, and it didn’t matter that I was extending the base class the native method names were based off of. I changed the method com.qualcomm.QCARSamples.ImageTargets.VuforiaTracking.openGlEsVersionNative to com.qualcomm.QCARSamples.ImageTargets.VuforiaTrackingActivity.openGlEsVersionNative and everything works accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android project that uses a C library to parse out a
I have created an Android Library. That has all the main code. Also I
Today my final project setup has an Android library dependency. That Android library dependency
I'm using the stackmob API in an android project and it seems that the
I have an Android app that references to a library Android project. That setup
I have an Android project that contains a class that uses JNI to pull
How do you setup a project that can result in a jar library file
I am writing an Android project that needs to use the Apache HttpClient from
I'm using Eclipse to manage my Android project, which uses Amazon's Android libraries for
I am writing an android project which has Native layer helping the java layer,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.