Hello everyone!
I have problems with debug for android application.
I saw a similar topics of my.
this is
ERROR: The device does not support the application's targetted CPU ABIs!
Device supports: armeabi-v7a armeabi
Package supports: Android NDK: jni/Android.mk: Cannot find module with tag 'CocosDenshion/android' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
# set params
NDK_ROOT=$NDK_ROOT
COCOS2DX_ROOT=$COCOS2DX_ROOT
GAME_ROOT=$COCOS2DX_ROOT/game
GAME_ANDROID_ROOT=$GAME_ROOT/android
RESOURCE_ROOT=$GAME_ROOT/Resources
buildexternalsfromsource=
usage(){
cat << EOF
usage: $0 [options]
Build C/C++ native code using Android NDK
OPTIONS:
-s Build externals from source
-h this help
EOF
}
while getopts "s" OPTION; do
case "$OPTION" in
s)
buildexternalsfromsource=1
;;
h)
usage
exit 0
;;
esac
done
# make sure assets is exist
if [ -d $GAME_ANDROID_ROOT/assets ]; then
rm -rf $GAME_ANDROID_ROOT/assets
fi
mkdir $GAME_ANDROID_ROOT/assets
# copy resources
for file in $RESOURCE_ROOT/*
do
if [ -d "$file" ]; then
cp -rf "$file" $GAME_ANDROID_ROOT/assets
fi
if [ -f "$file" ]; then
cp "$file" $GAME_ANDROID_ROOT/assets
fi
done
if [[ $buildexternalsfromsource ]]; then
echo "Building external dependencies from source"
$NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT \
NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/source
else
echo "Using prebuilt externals"
$NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT \
NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt
fi
I use CCLOG and reading logcat on debugging android ndk apps.
Do you have any better solution? I heard that ARM has release an eclipse plugin called DS-5, which can debug in graphic IDE.
Walzer now you can debug android native apps by updating eclipse to ADT 20 and using NDK plugin
>
Here is the link …Follow the steps that’s it …
> http://tools.android.com/recent/usingthendkplugin
thanks, it’s working.
but I have this issue : warning: while parsing target library list (at line 2): No segment defined for com.debug.test warning: .dynamic section for "/path/to/cocos2dx/DebugTest/proj.android/obj/local/armeabi/linker" is not at the expected address (wrong library or version mismatch?) warning: Could not load shared library symbols for 79 libraries, e.g. libstdc++.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code.
and when a bug is in a c++ library, i have no trace.