Hi All,

I have nailed down the problem to xyz.so.
When I remove xyz.so from my dependency list I am able to load my jni.so
from the App properly.
Not sure why this is happening, as I am able to test my jni.so from native
test app which is dependent on both abc.so and xyz.so.
But when I do the same thing from App the jni.so is not getting loaded.
Looks like some problem with my xyz.so.

Another observation, if I replace my xyz.so with any other lib (copy some
other .so and rename it to xyz.so) I am able to load my jni.so.
I will debug it further and let you all know the exact root cause of this
issue. ( one wild guess is my xyz.so is having lot of assembly code and this
could be one of problems).

Thanks a lot for your inputs.

Regards
APT

2009/4/23 Hsiung, Chuan-Da 熊全達 <[email protected]>

> APT, could you try to remove abc.so and xyz.so from the prelink map?
>
> CD
>
>
>
> On Wed, Apr 22, 2009 at 10:39 PM, MMF <[email protected]> wrote:
>
>> Hi Naveen,
>>
>> I have tried all the options.
>> It is not about the name which I mention. If I am loading a jni.so which
>> is having dependencies on some other .so files then it is giving me an error
>> else it works fine.
>>
>> Thanks
>> APT
>>
>> On Wed, Apr 22, 2009 at 7:01 PM, Naveen Krishna Ch <
>> [email protected]> wrote:
>>
>>> Now i figured out the actual prblem
>>>
>>> system.loadlibrary("jni.so");
>>> change it to
>>> system.loadlibrary("jni");
>>>
>>> This is what u gotto mention
>>>
>>> 2009/4/22 Naveen Krishna Ch <[email protected]>
>>>
>>>
>>>>
>>>> 2009/4/22 MMF <[email protected]>
>>>>
>>>>> Hi Naveen,
>>>>>
>>>>> Thanks for the reply.
>>>>> I have already mentioned both abc.so and xyz.so as dependencies libs
>>>>> for jni.so.
>>>>> I suppose without mentioning this my jni.so itself would not get
>>>>> generated.
>>>>> But still I get the mentioned error.
>>>>> I think there something more to it than just mentioning the
>>>>> dependencies.
>>>>>
>>>> Then i guess that missing thing is pushing the jni.so lib to emulator
>>>> with adb push ..
>>>> Are u using the Eclipse + Android SDk or u also have the Android Sources
>>>>
>>>>>
>>>>> Thanks
>>>>> APT
>>>>>
>>>>>
>>>>> On Wed, Apr 22, 2009 at 5:45 PM, Naveen Krishna Ch <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi APT/MMF,
>>>>>>
>>>>>> I have a similar need and i could make it work.
>>>>>>
>>>>>> abc.so and jni.so in my case.
>>>>>>
>>>>>> during the android build of jni.so i gave the abc.so as depended
>>>>>> shared libray in the Android.mk of jni.
>>>>>>
>>>>>> And in Java application i loaded the jni.so and it is working.
>>>>>>
>>>>>> I wish this would help u too
>>>>>>
>>>>>> 2009/4/22 MMF <[email protected]>
>>>>>>
>>>>>> Hi All,
>>>>>>>
>>>>>>> I am facing a problem while loading .so libs from my App.
>>>>>>>
>>>>>>> Here is the story:
>>>>>>>
>>>>>>> I have two native libs say *abc.so* and *xyz.so*.
>>>>>>> I have written a JNI component (say *jni.so*) which is calling APIs
>>>>>>> from abc.so and xyz.so.
>>>>>>>
>>>>>>> Now from the application (Java) when I do
>>>>>>> system.loadlibrary("jni.so") I get an error as "cannot find library".
>>>>>>>
>>>>>>> But when I remove the dependencies of abc.so and xyz.so from jni.so
>>>>>>> (say I just have some dummy functions in my jni.so) and try to load 
>>>>>>> jni.so
>>>>>>> from App, it works fine.
>>>>>>>
>>>>>>> Can someone please let me know what could be problem?
>>>>>>>
>>>>>>> Thanks
>>>>>>> APT
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Cheers
>>>>>> (: Naveen Krishna Ch :)
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Cheers
>>>> (: Naveen Krishna Ch :)
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers
>>> (: Naveen Krishna Ch :)
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to