Hi,
I am an Android app developer, and I have purchased a Nexus One device
which I use to continuously test my developed Android applications.
Background:
-----------------
One of the applications I developed uses a native shared library (e.g.
myNativeLib.so). Only my application loads & uses this native library.
I had developed this app before Android NDK came out. I pack my native
library into my apk's 'assets' folder, and during my application start-
up, I extract this native library from my package's assets folder to
my app private directory (i.e. <assets> -> /data/data/<myappprocess>/
myNativeLib.so). Then I use System.load() API in my application to
dynamically load this native library.
Problem:
------------
This application was developed during Android 1.5 (i.e. cupcake) days
{I didn't have the Nexus One then}. The above procedure has been
working without any problems right from Android 1.5 to Android 2.2
(i.e. Froyo). I have also tested the same on my Nexus One for Android
2.1 (i.e. Eclair) and Android 2.2.
The problem began the moment I recently upgraded my Nexus One to
Android 2.2.1 via the FRG83 system update. Now, whenever I try to load
my native library, I get the following error:
D/dalvikvm( 3653): Trying to load lib /data/data/<myappprocess>/
<mynativelib>.so <some address>
I/dalvikvm( 3653): Unable to dlopen(/data/data/<myappprocess>/
<mynativelib>.so): Cannot load library: link_image[1995]: failed to
link <mynativelib>.so
What I have Tried:
--------------------------
1. I tried my application using Android 2.2 SDK (emulator)...it works,
no issues.
2. I checked out the latest froyo & android2.2.1 source code from
Android open-source, built & tested my application
+ native lib using the latest froyo source...it built & ran, no
issues. This should've taken care of any changes in the
native code dependencies between Android 2.2 & Android 2.2.1
3. I even checked Android 2.2.1 source code for dalvik (java System &
Runtime classes) + bionic (linker & dlopen
sources) between Android 2.2 & Android 2.2.1 (using source checked
out from Android open-source), but couldn't
find anything consequential
4. I am unable to return my Nexus One to Android 2.2 :(
I'm now confused...is the open-sourced-code for Android 2.2.1
different from what's available on Nexus One? What can I do to make my
application work on Nexus One?
---------------------------------------
---------------------------------------
Device: Nexus One
Carrier: Airtel
Country / Language: India/en
OS / build number (if applicable): Android 2.2.1 / FRG83
---------------------------------------
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en