I made a custom framework.jar for my device. This new framework include a new API which I'd like to use in my apps. Unfortunately, besides I included my own framework.jar in java build path, eclipse didn't see my new API and throw compiling time errors. How can I configure eclipse to use my custom framework.jar instead of the jar within android SDK?
[EDIT]
Based in @Yuri 's answer and some other insights, I created a tool (actually it is a shell script) to create a new platform in android SDK and merge jar files into it. It's available in XDA forums to download as well the instructions to use: http://forum.xda-developers.com/showthread.php?t=2619775
To build SDK you should run the following commands:
make update-api
make sdk
Since the API of Android has been modified the command make update-api
adds new API. The command make sdk
creates SDK in out
folder.
Then to start develop your applications in Eclipse using new SDK you should add this new SDK. There are 2 possibilities to do this. The first one is from the book "Embedded Android". I'll just copy it here:
Assuming you had already configured Eclipse for Android development using the in‐ structions at http://developer.android.com, you’ll need to carry out two additional steps to use your newly-built SDK. First, you’ll need to tell Eclipse the location of the new SDK. To do so, go to Window→Preferences→Android, enter the path to the new SDK in the ”SDK Location” box, and click OK. Also, for reasons that aren’t entirely clear to the author at the time of this writing, you also need to go to Window→“Android SDK Man‐ ager”, deselect all the items that might be selected except the first two under “Tools” and click on “Install 2 packages...” Once that is done, you’ll be able to create new projects using the new SDK and access any new APIs you expose in it. If you don’t do that second step, you’ll be able to create new Android projects, but none of them will resolve Java libraries properly and will, therefore, never build.
As for the second here it is:
out/host/linux-x86/sdk/
)platforms/android-2.3.3
android-2.3.3
to <your_name>
android-sdk-linux/platforms
build.prop
and assign to the property
ro.build.version.sdk
any negative number:
ro.build.version.sdk=-10