Thanks guys.

I also had a look into the mentioned example /develeopment/samples/
PlatformLibrary but since I have a prebuilt lib this is a little bit
different. But what helped me was the example of the libgoogleclient
which you can find under android-root/external/libgoogleclient. There
is a readybuilt .jar-file and it is declared for use in an Android.mk
like this:

============================= Android.mk
=====================================
LOCAL_PATH := $(my-dir)
include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libgoogleclient:googleclient-
lib.jar
include $(BUILD_MULTI_PREBUILT)
============================== EOF
=======================================


To make use of it in the framework's classes one has to add the
following lines to android-root/framework/base/Android.mk:

============================= Android.mk
=====================================
...
# this has to go right above the LOCAL_MODULE variable!
LOCAL_STATIC_JAVA_LIBRARIES := libgoogleclient
...
LOCAL_MODULE := framework
...
===========================================================================


Now it works :-)

Bye,
Patrick

On 10 Jul., 16:06, RaviY <yend...@pv.com> wrote:
> Did you look at the example in <repo>/development/samples/
> PlatformLibrary ?
>
> -Ravi
>
> On Jul 10, 12:40 am, sesha giri <sesha_giri_n...@yahoo.co.in> wrote:
>
> > I tried the same thing for cpp files
> > I had a static library with me so I just exported the library..
> > I created a new directory.
> > In that I copied the given .a file and than i createed a new Android.mk 
> > file with the following contents:
>
> > LOCAL_PATH := $(call my-dir)
> > include $(CLEAR_VARS)
>
> > LOCAL_PREBUILT_LIBS := libxxx.a
>
> > include $(BUILD_MULTI_PREBUILT)
>
> > LOCAL_STATIC_LIBRARIES += libxxx
>
> > By this I was able to export the library to the desired path.
> > For Java also there should me similar of that kind only please check with 
> > regard to java.
>
> > But if this thing dont work for you you need to re-sync the new workspace.
> > Becuase In my case it didnt worked on my system but it worked on other 
> > system with the same thing.
> > Dont know what is the reason for that.
> > But this is my experience.
> > You can give a try and see.
>
> > -Giri
>
> > ________________________________
> > From: kenpark <patrick.seiff...@gmx.net>
> > To: android-framework <android-framework@googlegroups.com>
> > Sent: Friday, 10 July, 2009 4:08:14 AM
> > Subject: How to use a prebuilt library in framework classes
>
> > Hi.
>
> > How can I make use of the packages and classes of a ready built
> > library in the framework's sources?
>
> > This is how I propagate the existence of the library in an Android.mk
> > which is placed under mydroid/external/mylib/
> > ===================================
> > # in the Android.mk
> > # declaring the library IceAndroid.jar
> > h
> > LOCAL_PATH := $(my-dir)
> > include $(CLEAR_VARS)
>
> > LOCAL_MODULE:= libiceandroid
>
> > LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libiceandroid:IceAndroid.jar
> > include $(BUILD_MULTI_PREBUILT)
> > ===================================
>
> > Then in the Android.mk under mydroid/frameworks/base/
> > ===================================
> > ...
> > LOCAL_SHARED_LIBRARIES := libiceandroid
>
> > LOCAL_MODULE := framework
> > ...
> > ===================================
>
> > I want to use the library's functionality in the
> > android.app.Application class for example. The library IceAndroid.jar
> > includes a package called Ice. But every time I build with "make" I
> > get the following error:
>
> > target Java: framework (out/target/common/obj/JAVA_LIBRARIES/
> > framework_intermediates/classes)
> > frameworks/base/core/java/android/app/Application.java:25: package Ice
> > does not exist
> > import Ice.Communicator;
> >           ^
>
> > Why?
>
> > Any advice is welcome.
> > Regards,
> > Patrick
>
> >       Yahoo! recommends that you upgrade to the new and safer Internet 
> > Explorer 8.http://downloads.yahoo.com/in/internetexplorer/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to