Cocos2dx 3.17 android compile time error

version : cocos2dx 3.17
sdk 9.0 api level 28
ndk 19.0.5232133

i compile android project in android studio but its give this error i can not get any solution . how to solve this

Build command failed.
Error while executing process /Users/milanitaliya/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/proj.android/app/jni/Android.mk NDK_APPLICATION_MK=/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/proj.android/app/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/proj.android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/proj.android/app/build/intermediates/ndkBuild/debug/lib NDK_TOOLCHAIN_VERSION=clang -j4 NDK_MODULE_PATH=/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d:/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos:/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/external NDK_DEBUG=1 /Users/milanitaliya/Desktop/projects/projects3/WordsWorld/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libMyGame.so}
[armeabi-v7a] SharedLibrary : libMyGame.so

/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos/2d/CCActionProgressTimer.cpp:78: error: undefined reference to ‘cocos2d::ui::LoadingBar::getPercent() const’
/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos/2d/CCActionProgressTimer.cpp:0: error: undefined reference to ‘typeinfo for cocos2d::ui::LoadingBar’
/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos/2d/CCActionProgressTimer.cpp:88: error: undefined reference to ‘cocos2d::ui::LoadingBar::setPercent(float)’
/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos/2d/CCActionProgressTimer.cpp:0: error: undefined reference to ‘typeinfo for cocos2d::ui::LoadingBar’
/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos/2d/CCActionProgressTimer.cpp:142: error: undefined reference to ‘cocos2d::ui::LoadingBar::setPercent(float)’
/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/cocos2d/cocos/2d/CCActionProgressTimer.cpp:0: error: undefined reference to ‘typeinfo for cocos2d::ui::LoadingBar’
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/milanitaliya/Desktop/projects/projects3/WordsWorld/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libMyGame.so] Error 1

I got the same error. Tentatively I commented out these lines and build.

How did you obtain cocos2d-x?

What command did you use to compile?

no command for compile just click on run button in android studio.

i get it from download section in cocos2dx web site

if i use ProgressBar in my game so i cant put this line in comment.
have you any other solution?

i commented out this but still not working

i am stuck in this please help me

What do your source files look like where you are using LoadingBar?

i am using ProgressTimer in my game if i commented out all code related ProgressTimer the its work fine

this is my code in which i use ProgressTimer

LevelComplite.cpp (16.8 KB)
LevelComplite.h (865 Bytes)

i dont see

#include "ui/CocosGUI.h"

this is work fine in ios but probem in android

i include it in my header file i make one header file for all include!
58%20PM

if comment this line then its work

// progress->runAction(Sequence::create(DelayTime::create(1.3),ProgressTo::create(0.5, progressRate), NULL));

how to solve this?

Is this your code or are you commenting it out in engine code?

i did’t change any thing in engine code i just comment my run action of progressTimer object and it work file
this is my run action
progress->runAction(Sequence::create(DelayTime::create(1.3),ProgressTo::create(0.5, progressRate), NULL));

but if i uncomment this line then it give me error

Sorry I don’t quite follow. This line is in your own game? Show me the code please.

progress=ProgressTimer::create(Sprite::create("progress_bar_fill.png"));
    progress->setPosition(Vec2(384.00, (1024-736.00)));
    progress->setMidpoint(Vec2(0, 0.5));
    progress->setType(ProgressTimer::Type::BAR);
    progress->setBarChangeRate(Vec2(1, 0));
    this->addChild(progress);
progress->runAction(Sequence::create(DelayTime::create(1.3),ProgressTo::create(0.5, 100), NULL));

this is my full code .
if i put this code in may game it will give me compile time error in android studio .
if i remove this code its compile successfully .
error is

59%20PM

are you got it ? @slackmoehrle

ProgressTimer depends upon LoadingBar:

image

I tried cpp-tests and it works for me.

Check out test 5 Actions Progress.

and also there is example code in test → cpp-tests → Classes → ActionsProgressTest

are you check it in android ?