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
Try this:
This is a good question! Your tip would be useful for Android Studio users as well, I guess.
Just FYI, for IntelliJ users, you can also do this:
By step 4, you can avoid making a huge .dex. (Your apk will not include the framework.jar.)
To build SDK you should run the following commands:
Since the API of Android has been modified the command
make update-api
adds new API. The commandmake sdk
creates SDK inout
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:
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 propertyro.build.version.sdk
any negative number:ro.build.version.sdk=-10