I’ve got a project that compiles in XCode but fails in Android Studio. Below is the build output. It doesn’t help me get any closer to understanding what the problem is. Here’s some background: I started a project using cocos2d-x 3.12. A while later I upgraded to 3.17 and then noticed that the box2d files were modified (not just modified, but support has more or less be informally removed considering how many steps it takes to get box2d working). Instead of using the prebuilt box2d files, I included the source files as I needed a slightly modified version of box2d. So I got it to build in XCode. At that point it seemed my only issue was adding the proper dependencies to Android Studio, so I asked a question in these forums. The nice people tried to help, suggesting I update to 3.17.2 and use CMake and I edit the CMakeLists.txt. I also changed PROP_BUILD_TYPE=cmake
in gradle.properties. And so that’s where I’m at. I can’t really tell what, if anything, CMake is doing. The README.md file in the cmake folder kind of explains how one might make various builds, but I don’t understand why anyone would do that since it’s already done for you when you use the cocos new
command. I am really lost. I’ll RTFM if someone can point me to it.
build failed 456 ms
Run build 413 ms
Load build 2 ms
Configure build 144 ms
Calculate task graph 30 ms
Run tasks 235 ms
null
API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
null
/Users/some_guy/Documents/some_project/C++/proj.android
../cocos2d/cocos/platform/android/java/src
../../../../../../../../cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java
error: cannot find symbol class DisplayCutout
error: cannot find symbol variable P
error: cannot find symbol variable layoutInDisplayCutoutMode
error: cannot find symbol variable LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
error: cannot find symbol class DisplayCutout