[android-developers] Re: How can I package shared libs only into apk

2009-10-12 Thread Roman ( T-Mobile USA)

Which version of the NDK are you using? I am using 1.5 and the
Android.mk does not look as complicated.

By the way, try to ask your question in the Android-NDK instead of the
developer group!

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Oct 12, 1:19 am, tica ticat...@163.com wrote:
 From the SimpleJNI's sample code, the Android.mk is like this:
 # This makefile shows how to build a shared library and an activity
 that
 # bundles the shared library and calls it using JNI.

 TOP_LOCAL_PATH:= $(call my-dir)

 # Build activity

 LOCAL_PATH:= $(TOP_LOCAL_PATH)
 include $(CLEAR_VARS)

 LOCAL_MODULE_TAGS := samples
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 LOCAL_PACKAGE_NAME := SimpleJNI
 LOCAL_JNI_SHARED_LIBRARIES := libsimplejni
 include $(BUILD_PACKAGE)

 # 
 # Also build all of the sub-targets under this one: the shared
 library.
 include $(call all-makefiles-under,$(LOCAL_PATH))

 And I know add the LOCAL_JNI_SHARED_LIBRARIES variable can tell the
 build system to add libsimplejni.so into the apk file , but the
 libsimplejni.so file will still copy into /system/lib/ directory. How
 can I make the libraries only build into apk ,and it will not copy to /
 system/lib directory in the Android build system ?Cause I do not need
 it anymore if the libs were already included in the apk.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I package shared libs only into apk

2009-10-12 Thread Dianne Hackborn
You should use the NDK.  If you are compiling as a platform component,
things are very different, and you won't have you code inside of a .apk.

On Mon, Oct 12, 2009 at 6:51 PM, tica ticat...@163.com wrote:


 Thx.But I'm not using the NDK, I build it in Android's src codes tree.

 On Oct 13, 1:43 am, Roman ( T-Mobile USA) roman.baumgaert...@t-
 mobile.com wrote:
  Which version of the NDK are you using? I am using 1.5 and the
  Android.mk does not look as complicated.
 
  By the way, try to ask your question in the Android-NDK instead of the
  developer group!
 
  --
  Roman Baumgaertner
  Sr. SW Engineer-OSDC
  ·T· · ·Mobile· stick together
  The views, opinions and statements in this email are those of the
  author solely in their individual capacity, and do not necessarily
  represent those of T-Mobile USA, Inc.
 
  On Oct 12, 1:19 am, tica ticat...@163.com wrote:
 
   From the SimpleJNI's sample code, the Android.mk is like this:
   # This makefile shows how to build a shared library and an activity
   that
   # bundles the shared library and calls it using JNI.
 
   TOP_LOCAL_PATH:= $(call my-dir)
 
   # Build activity
 
   LOCAL_PATH:= $(TOP_LOCAL_PATH)
   include $(CLEAR_VARS)
 
   LOCAL_MODULE_TAGS := samples
   LOCAL_SRC_FILES := $(call all-subdir-java-files)
   LOCAL_PACKAGE_NAME := SimpleJNI
  LOCAL_JNI_SHARED_LIBRARIES:= libsimplejni
   include $(BUILD_PACKAGE)
 
   # 
   # Also build all of the sub-targets under this one: the shared
   library.
   include $(call all-makefiles-under,$(LOCAL_PATH))
 
   And I know add the LOCAL_JNI_SHARED_LIBRARIES variable can tell the
   build system to add libsimplejni.so into the apk file , but the
   libsimplejni.so file will still copy into /system/lib/ directory. How
   can I make the libraries only build into apk ,and it will not copy to /
   system/lib directory in the Android build system ?Cause I do not need
   it anymore if the libs were already included in the apk.
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---