这里是简要的错误日志:
Build command failed.
Error while executing process D:\Program with arguments {Files\Android\AndroidSDKs\cmake\3.10.2.4988404\bin\cmake.exe --build D:\GameDevelopment\MyProject\2048\proj.android\app.externalNativeBuild\cmake\debug\armeabi-v7a --target MyGame}
[1/1] Linking CXX shared library …\build\intermediates\cmake\debug\obj\armeabi-v7a\libMyGame.so
FAILED: …/…/…/…/build/intermediates/cmake/debug/obj/armeabi-v7a/libMyGame.so
cmd.exe /C “cd . && “D:\Program Files\Android\AndroidSDKs\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe” --target=armv7-none-linux-androideabi16 --gcc-toolchain=“D:/Program Files/Android/AndroidSDKs/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64” --sysroot=“D:/Program Files/Android/AndroidSDKs/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot” -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -frtti -fexceptions -fsigned-char -O0 -fno-limit-debug-info -Wl,–exclude-libs,libgcc.a -Wl,–exclude-libs,libgcc_real.a -Wl,–exclude-libs,libatomic.a -static-libstdc++ -Wl,–build-id -Wl,–fatal-warnings -Wl,–exclude-libs,libunwind.a -Wl,–no-undefined -Qunused-arguments -shared -Wl,-soname,libMyGame.so -o …\build\intermediates\cmake\debug\obj\armeabi-v7a\libMyGame.so CMakeFiles/MyGame.dir/Classes/AppDelegate.cpp.o CMakeFiles/MyGame.dir/Classes/HelloWorldScene.cpp.o CMakeFiles/MyGame.dir/proj.android/app/jni/hellocpp/main.cpp.o -Wl,–whole-archive engine/cocos/platform/libcpp_android_spec.a -Wl,–no-whole-archive lib/libcocos2d.a lib/libexternal.a …/…/…/…/…/…/cocos2d/external/Box2D/prebuilt/android/armeabi-v7a/libbox2d.a …/…/…/…/…/…/cocos2d/external/chipmunk/prebuilt/android/armeabi-v7a/libchipmunk.a …/…/…/…/…/…/cocos2d/external/freetype2/prebuilt/android/armeabi-v7a/libfreetype.a lib/libext_recast.a …/…/…/…/…/…/cocos2d/external/bullet/prebuilt/android/armeabi-v7a/libLinearMath.a …/…/…/…/…/…/cocos2d/external/bullet/prebuilt/android/armeabi-v7a/libBulletDynamics.a …/…/…/…/…/…/cocos2d/external/bullet/prebuilt/android/armeabi-v7a/libBulletCollision.a …/…/…/…/…/…/cocos2d/external/bullet/prebuilt/android/armeabi-v7a/libLinearMath.a …/…/…/…/…/…/cocos2d/external/bullet/prebuilt/android/armeabi-v7a/libBulletMultiThreaded.a …/…/…/…/…/…/cocos2d/external/bullet/prebuilt/android/armeabi-v7a/libMiniCL.a …/…/…/…/…/…/cocos2d/external/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a …/…/…/…/…/…/cocos2d/external/webp/prebuilt/android/armeabi-v7a/libwebp.a …/…/…/…/…/…/cocos2d/external/websockets/prebuilt/android/armeabi-v7a/libwebsockets.a …/…/…/…/…/…/cocos2d/external/openssl/prebuilt/android/armeabi-v7a/libssl.a …/…/…/…/…/…/cocos2d/external/openssl/prebuilt/android/armeabi-v7a/libcrypto.a …/…/…/…/…/…/cocos2d/external/uv/prebuilt/android/armeabi-v7a/libuv_a.a lib/libext_tinyxml2.a lib/libext_xxhash.a lib/libext_xxtea.a lib/libext_clipper.a lib/libext_edtaa3func.a lib/libext_convertUTF.a lib/libext_poly2tri.a lib/libext_md5.a …/…/…/…/…/…/cocos2d/external/curl/prebuilt/android/armeabi-v7a/libcurl.a …/…/…/…/…/…/cocos2d/external/png/prebuilt/android/armeabi-v7a/libpng.a engine/external/android-specific/cpufeatures/libext_cpufeatures.a -ldl lib/libext_pvmp3dec.a lib/libext_tremolo.a …/…/…/…/…/…/cocos2d/external/zlib/prebuilt/android/armeabi-v7a/libz.a lib/libext_unzip.a -lGLESv2 -lEGL -llog -landroid -lOpenSLES -latomic -lm && cd .”
…/…/…/…/…/…/Classes/AppDelegate.cpp:115: error: undefined reference to ‘Game2048Scene::createScene()’
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
看日志应该是和上网查看
估计是 没有提前 编译 我新增加的各种类为库文件
本身对 cmake 和 android studio 很陌生,不知道该具体怎么操作
在网上搜了一大圈 还是没有找到怎么解决。求大佬指点