取消勾选studio,能够编译通过,但是撞到测试机上闪退,勾选上studio通不过编译出现ndk未配置的错误,从前面的信息来看是已经配置了ndk的路径,大神帮忙看一下,卡了两天了。tools用的25.2.3。
生成的local.properties里面没有ndk.dir,加上之后编译又给覆盖掉了。
如有能遇到类似问题解决过的大侠,请留步,感激不尽-。-
编译模式:release
使用 Android Studio 工程:E:\CocosWorkspace\HelloWord\build\jsb-binary\frameworks\runtime-src\proj.android-studio
正在执行:’“Z:\Android\sdk\tools\android” update project -t android-21 -p E:\CocosWorkspace\HelloWord\build\jsb-binary\frameworks\runtime-src\proj.android-studio\app’
Updated project.properties
Updated local.properties
No project name specified, using Activity name ‘AppActivity’.
If you wish to change it, edit the first line of build.xml.
Added file E:\CocosWorkspace\HelloWord\build\jsb-binary\frameworks\runtime-src\proj.android-studio\app\build.xml
Added file E:\CocosWorkspace\HelloWord\build\jsb-binary\frameworks\runtime-src\proj.android-studio\app\proguard-project.txt
正在执行 ndk-build…
NDK 编译模式:release
正在执行:’“Z:\Android\sdk\ndk-bundle\ndk-build” -C E:\CocosWorkspace\HelloWord\build\jsb-binary\frameworks\runtime-src\proj.android-studio\app -j4 APP_ABI=“x86” NDK_MODULE_PATH=C:/CocosCreator/resources/cocos2d-x;C:/CocosCreator/resources/cocos2d-x/cocos;C:/CocosCreator/resources/cocos2d-x/external NDK_TOOLCHAIN_VERSION=4.9’
Android NDK: Found platform level in ./project.properties. Setting APP_PLATFORM to android-21.
Android NDK: WARNING: APP_PLATFORM android-21 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will not be comptible with devices older than android-21. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
make: Entering directory `E:/CocosWorkspace/HelloWord/build/jsb-binary/frameworks/runtime-src/proj.android-studio/app’
[x86] Compile++ : cocos2djs_shared <= AppDelegate.cpp
Parsing the SDK, no caching allowed
Using incremental javac compilation.
Incremental java compilation is an incubating feature.
Not using incremental javac compilation.
Using incremental javac compilation.
Not using incremental javac compilation.
Not using incremental javac compilation.
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring project ‘:hello_world’.
NDK not configured.
Download it with SDK manager.)
- Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 15.477 secs
Stopped 0 compiler daemon(s).
执行命令出错,返回值:1。