android studio 运行 cocos2d-x-3.17.1 CppTests 程序黑屏闪退

按照官网文档引入cocos2d-x root/tests/cpp-tests/proj.android-studio ,会报SIMPLE: Error configuring错误,把classpath ‘com.android.tools.build:gradle:3.1.0’ 改为classpath ‘com.android.tools.build:gradle:3.3.2’,终于能运行,但是黑屏闪退呢!如果不修改gradle,就会报SIMPLE: Error configuring错误,抓狂。log如下:

2019-03-20 16:25:37.050 30654-30654/? I/os2dx.cpp_test: Not late-enabling -Xcheck:jni (already on)
2019-03-20 16:25:37.077 30654-30654/? W/os2dx.cpp_test: Unexpected CPU variant for X86 using defaults: x86
2019-03-20 16:25:37.261 30654-30654/org.cocos2dx.cpp_tests W/os2dx.cpp_test: JIT profile information will not be recorded: profile file does not exits.
2019-03-20 16:25:37.262 30654-30654/org.cocos2dx.cpp_tests I/chatty: uid=10090(org.cocos2dx.cpp_tests) identical 10 lines
2019-03-20 16:25:37.262 30654-30654/org.cocos2dx.cpp_tests W/os2dx.cpp_test: JIT profile information will not be recorded: profile file does not exits.
2019-03-20 16:25:37.316 30654-30654/org.cocos2dx.cpp_tests I/InstantRun: starting instant run server: is main process
2019-03-20 16:25:37.639 30654-30654/org.cocos2dx.cpp_tests D/main: cocos_android_app_init
2019-03-20 16:25:37.647 30654-30654/org.cocos2dx.cpp_tests D/Cocos2dxHelper: isSupportLowLatency:false
2019-03-20 16:25:37.655 30654-30654/org.cocos2dx.cpp_tests D/Cocos2dxHelper: sampleRate: 48000, framesPerBuffer: 720
2019-03-20 16:25:37.655 30654-30654/org.cocos2dx.cpp_tests D/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp: nativeSetAudioDeviceInfo: sampleRate: 48000, bufferSizeInFrames: 720
2019-03-20 16:25:37.721 30654-30654/org.cocos2dx.cpp_tests D/OpenGLRenderer: HWUI GL Pipeline
2019-03-20 16:25:37.752 30654-30654/org.cocos2dx.cpp_tests D/Cocos2dxActivity: onResume()
2019-03-20 16:25:38.012 30654-30677/org.cocos2dx.cpp_tests I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2019-03-20 16:25:38.012 30654-30677/org.cocos2dx.cpp_tests I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2019-03-20 16:25:38.012 30654-30677/org.cocos2dx.cpp_tests I/OpenGLRenderer: Initialized EGL, version 1.4
2019-03-20 16:25:38.012 30654-30677/org.cocos2dx.cpp_tests D/OpenGLRenderer: Swap behavior 1
2019-03-20 16:25:38.013 30654-30677/org.cocos2dx.cpp_tests W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without…
2019-03-20 16:25:38.013 30654-30677/org.cocos2dx.cpp_tests D/OpenGLRenderer: Swap behavior 0
2019-03-20 16:25:38.057 30654-30677/org.cocos2dx.cpp_tests D/EGL_emulation: eglCreateContext: 0xebb93f60: maj 2 min 0 rcv 2
2019-03-20 16:25:38.095 30654-30677/org.cocos2dx.cpp_tests D/EGL_emulation: eglMakeCurrent: 0xebb93f60: ver 2 0 (tinfo 0xd82d5c00)
2019-03-20 16:25:38.112 30654-30674/org.cocos2dx.cpp_tests D/EGL_emulation: eglCreateContext: 0xebe85480: maj 2 min 0 rcv 2
2019-03-20 16:25:38.191 30654-30674/org.cocos2dx.cpp_tests D/EGL_emulation: eglMakeCurrent: 0xebe85480: ver 2 0 (tinfo 0xebe836b0)
2019-03-20 16:25:38.197 30654-30677/org.cocos2dx.cpp_tests D/EGL_emulation: eglMakeCurrent: 0xebb93f60: ver 2 0 (tinfo 0xd82d5c00)
2019-03-20 16:25:38.206 30654-30674/org.cocos2dx.cpp_tests D/cocos2d-x debug info: {
cocos2d.x.version: cocos2d-x-3.17.1
cocos2d.x.compiled_with_gl_state_cache: true
gl.supports_S3TC: false
cocos2d.x.build_type: DEBUG
gl.supports_vertex_array_object: true
cocos2d.x.compiled_with_profiler: false
gl.renderer: Android Emulator OpenGL ES Translator (Intel® HD Graphics 4600)
gl.vendor: Google (Intel)
gl.version: OpenGL ES 2.0 (4.2.0 - Build 10.18.10.3262)
gl.supports_ATITC: false
gl.supports_ETC1: true
gl.supports_OES_packed_depth_stencil: true
gl.max_texture_units: 96
gl.supports_PVRTC: false
gl.max_texture_size: 16384
gl.supports_NPOT: true
gl.supports_OES_map_buffer: false
gl.supports_OES_depth24: true
gl.supports_discard_framebuffer: false
gl.supports_BGRA8888: false
}
2019-03-20 16:25:38.260 30654-30674/org.cocos2dx.cpp_tests D/cocos2d-x debug info: cocos2d: fullPathForFilename: No file found at configs/config-example.plist. Possible missing file.
2019-03-20 16:25:38.261 30654-30674/org.cocos2dx.cpp_tests D/cocos2d-x debug info: Assert failed: cannot create dictionary
2019-03-20 16:25:38.261 30654-30674/org.cocos2dx.cpp_tests E/cocos2d-x assert: D:\cocos2d-x\cocos\base\CCConfiguration.cpp function:loadConfigFile line:354
2019-03-20 16:25:38.261 30654-30674/org.cocos2dx.cpp_tests D/cocos2d-x debug info: Invalid config format for file: configs/config-example.plist
2019-03-20 16:25:38.262 30654-30674/org.cocos2dx.cpp_tests D/cocos2d-x debug info: Console: IPV6 server is listening on [::]:5678
2019-03-20 16:25:38.263 30654-30674/org.cocos2dx.cpp_tests D/cocos2d-x debug info: cocos2d: fullPathForFilename: No file found at fonts/arial.ttf. Possible missing file.
2019-03-20 16:25:38.264 30654-30674/org.cocos2dx.cpp_tests A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 30674 (GLThread 620), pid 30654 (os2dx.cpp_tests)
2019-03-20 16:25:38.414 30654-30654/org.cocos2dx.cpp_tests D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true

麻烦大神帮我看下,新手,不是很懂这个呢

自己顶呢。。。。。sad
改了ndk版本为17的,ninja 也安装了,还是SIMPLE: Error configuring,无解啊。Android stduio版本是最新的,classpath ‘com.android.tools.build:gradle:3.1.0’ 不变。

我用的ndk16…运行没问题就是频繁闪退…退回去用3.16吧

多谢老哥,我不死心又重新运行了3.16,神奇的可以运行了。呼。。。。可能是ninjia、ndk设置一通就好了