Log in or register to post comments

Unsatisfied Link Error

January 22, 2012 - 3:54am #1

Hello everybody!

I just tried the Sample project Image Targets, but everytime i try to run it on my Mobile Phone i get the following error:

java.lang.UnsatisfiedLinkError : getOpenGlEsVersionNative

Could you tell me how i can get aroudn those error?

Unsatisfied Link Error

August 14, 2012 - 9:58am #7

Ok, its fix.

sorry for your time.

Unsatisfied Link Error

August 14, 2012 - 9:55am #6

I realize of the first issue just after post it. But I recieve the same message and also this one(Cartel is my new class):

08-14 18:54:28.015: W/dalvikvm(10229): No implementation found for native Lcom/qualcomm/QCARSamples/ImageTargets/Cartel;.getCoordinates ([D)[I

Unsatisfied Link Error

August 14, 2012 - 9:47am #5

Hi,

I have the same message on logcat. First I add my own method to ImagenTargets.cpp and then I tried to load the library to my new class but I recieved that error. This is the code I use in the new class:

     // Name of the native dynamic libraries to load:
     private static final String NATIVE_LIB_SAMPLE = "ImageTargets";
     public native int[] getCoordinates(double[] cord);
     static
     {
         com.qualcomm.QCARSamples.ImageTargets.ImageTargets.loadLibrary(NATIVE_LIB_SAMPLE);
     }

Unsatisfied Link Error

August 14, 2012 - 9:46am #4

Try unquoting the argument to loadLibrary, so that it is com.qualcomm.QCARSamples.ImageTargets.ImageTargets.loadLibrary(NATIVE_LIB_SAMPLE);

Also you should see log messages indicating whether the library has been loaded successfully ..

    /** A helper for loading native libraries stored in "libs/armeabi*". */
    public static boolean loadLibrary(String nLibName)
    {
        try
        {
            System.loadLibrary(nLibName);
            DebugLog.LOGI("Native library lib" + nLibName + ".so loaded");
            return true;
        }
        catch (UnsatisfiedLinkError ulee)
        {
            DebugLog.LOGE("The library lib" + nLibName +
                            ".so could not be loaded");
        }
        catch (SecurityException se)
        {
            DebugLog.LOGE("The library lib" + nLibName +
                            ".so was not allowed to be loaded");
        }
       
        return false;
    } 

Re: Unsatisfied Link Error

January 23, 2012 - 12:50pm #3

You may also need to refresh the Eclipse project after running ndk-build. Right-click in the Package Explorer and choose Refresh.

- Kim

Re: Unsatisfied Link Error

January 23, 2012 - 8:59am #2

Looks like you have not built the required libraries.
Did you do "ndk-build" in your project directory?

Log in or register to post comments