'out/apps/MyApplication//libexternal1.a' : file not recognized: File
format not recognized

--The above error might mean that the toolchain with which you have compiled
libexternal1.a, is not compatible with Android toolchain.

Regards,
Sonal

On Wed, Jan 6, 2010 at 4:01 AM, purvi <purvi.n...@gmail.com> wrote:

> Hi,
>
> I have a question. To include any external library whether a static
> library (*.a) or shared library (*.so) and link to the current native
> shared library I have to inlcude the below code in my Andriod.mk
>
>    include $(CLEAR_VARS)
>
>    LOCAL_PREBUILT_LIBS:= libexternal1.a
>
>    include $(BUILD_MULTI_PREBUILT)
>
>    include $(CLEAR_VARS)
>
>    LOCAL_MODULE:=mynativeexample
>
>    LOCAL_SRC_FILES:=myexample.c
>
>    LOCAL_STATIC_LIBRARIES:=libexternal1
>
>    include $(BUILD_SHARED_LIBRARY)
>
> The library libexternal1.a is compiled and build outside android. and
> resides in the directory same as the path of my Andriod.mk
> The path is \android-ndk-1.6_r1\apps\MyApplication\project\jni\.
>
> And I am getting an error : No rule to make target 'out/apps/
> MyApplication//libexternal1.a' needed to make 'out/apps/MyApplication//
> mynativeexample.so'
> If I copy the libexternal1.a to 'out/apps/MyApplication//' it gives me
> error
> 'out/apps/MyApplication//libexternal1.a' : file not recognized: File
> format not recognized
> As per few android-ndk threads I went thru it is improper to copy the
> libexternal1.a to the out directory as the library should be
> automatically created in the 'out' directory.
> Something is missing in my Android.mk or something related to path of
> my external static library.
>
> The same error occurs when I use a shared library instead of static
> library.
>
> Can anyone please help me why is this happening and how to solve
> this.?
>
> Thanks.
> Regards,
> Purvi
>
> --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to