Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 326 by [email protected]: protobuf shared library works well in
android 2.3(NDK), but can not work on Android 2.1(NDK) and 2.2NDK
http://code.google.com/p/protobuf/issues/detail?id=326
What steps will reproduce the problem?
1.I compiled protobuf(version 2.4.1) to libprotubuf.so with
NDKr5+cygwin+windows XP.
2.In java code, load this libprotobuf.so like this:
System.loadLibrary("protobuffull");
3.run my test code to use protobuf.
What is the expected output? What do you see instead?
When I run my test code in android 2.3, it worked very well, load
libprotobuf.so and then run my test code correctly.
But when I run the code in android 2.1, I found that I can't load
libprotobuf.so. The logcat showed that it stopped when I try to load
libprotubuf.so .
What version of the product are you using? On what operating system?
the version of protobuf is 2.4.1, the cell phone os is android 2.1 ,2.2 and
2.3.
Please provide any additional information below.
1. Android.mk:
...
...
..
google/protobuf/io/zero_copy_stream_impl.cc \
google/protobuf/io/zero_copy_stream_impl_lite.cc
LOCAL_CPP_EXTENSION := .cc
LOCAL_C_INCLUDES := $(LOCAL_PATH)/google/protobuf/io \
$(LOCAL_PATH)/google/protobuf/stubs \
$(LOCAL_PATH)/google/protobuf \
$(LOCAL_PATH)/google/protobuf/compiler \
$(LOCAL_PATH)
LOCAL_LDLIBS := -lz
include $(BUILD_SHARED_LIBRARY)
2. load the shared lib in java code :
System.loadLibrary("protobuffull"); //(it doesn't work in android 2.1 2.2
cell phone, but it works well in android 2.3 cell phone)
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.