Plan to release it at the end of March.
Oh, why, WHY project build stuff is so hard. I want to cry
Downloaded and installed cocos2d-x from github - Android Studio shows all files and build ok, can also debug c++. Nice!
Iām however not able to shift-click and navigate through C++ code. Is it just my installation or this doesnāt work (yet) in Android studio?
I guess itās a known bug with NDK 14 (Android studio 2.3): https://code.google.com/p/android/issues/detail?id=231382
FYI: I also had to change : to ; on Windows for NDK_MODULE_PATH. Is there a way to make this conditional?
Yep, in latest v3.15 branch, i make it conditional, but i havenāt tested on Windows. It is slow to download Android Studio and install all plugins.
I looked at the change in 3.15 and it seems legit (maybe you could use File.pathSeparator - though Iām no expert).
Whatās weird is Iām getting these warnings (even without your change, just using a project from generated from master):
Build MyGame x86
Android NDK: WARNING: Ignoring unknown import directory: ../../../../cocos
Android NDK: WARNING: Ignoring unknown import directory: ../../../../external
I tried all possible combinations from ā¦/cocos to ā¦/ā¦/ā¦/ā¦/ā¦/cocos but the warning does not go away.
Itās weird - when you sync gradle there is no messageā¦ but if you Build the project then it happens.
Canāt build newly created project by cocos 3.15 from github with android studio on windows; Error log:
:MyGame:externalNativeBuildDebug FAILE
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':MyGame:externalNativeBuildDebug'.
> Unexpected native build target MyGame. Valid values are:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debu
How to fix that?ore log output.
BUILD FAILED
How to fix that?
@samo_dadela now we use project.file()
to get the path to remove ..
. Did you try latest v3.15 branch?
@Effolkronium i donāt know the issue, i will try it on windows.
@Effolkronium i tested with latest v3.15 branch. can not reproduce it. Could you please synchronize the codes and try again? If you also have the issue, could you please describe what you do step by step?
I switched to v3.15, updated submodules, run setup.py (is this needed at all?) and create a new project with:
cocos new -p net.amo2.enginetest -l cpp EngineTest
The opened Android Studio and started the build (Make Project):
Build MyGame armeabi
Android NDK: WARNING: Ignoring unknown import directory: C:\
Android NDK: WARNING: Ignoring unknown import directory: C:\cocos
Android NDK: WARNING: Ignoring unknown import directory: C:\external
This happens each time I run the build. Note that everything works fine, just the warning is weird.
My cocos installation is in C:\Cocos2d-x\GitHub and the project is in C:\Tmp\EngineTest.
Also note Iām using ndk13b (because of problem in ndk14 - ctrl-click doesnāt work in Android Studio). Android Studio is 2.3.
I also switched back to ndk14 - same. I noticed the warning happens also if you Clean Project.
I can help you troubleshoot this if just give me some hints
So looking at the pathsā¦ what are they referencing - the engine directory withing the project directory?
If so it should be like this:
def module_paths = [project.file("../../cocos2d"),
project.file("../../cocos2d/cocos"),
project.file("../../cocos2d/external")]
No warnings, if I use that!
Iāll test if the app works on device.
I did.
Thatās from your link:
def module_paths = [project.file("../../../.."),
project.file("../../../../cocos"),
project.file("../../../../external")]
Note my changes are in the stringsā¦ i.e āā¦/ā¦/cocos2dā!
Are you maybe testing this with cpp-tests? That would explain the difference in path indirection.
Yep, you are right. It seems i forgot to update cpp template.
OK. Let me know when you push the change so Iāll retest it.
@zhangxm
This works, now. Thanks!
I found a new problem, though. Was happening also before this PR in v3.15 - one of the old projects I have (I think itās from cocos2d-x.org version 3.14-1) does not have it.
The problem is that if you open AppDelegate.cpp in Android Studio some methods/classes are colored red and Idea reports "This file is not part of the project. Please include it in the appropriate build file (build.gradle, CMakeList.txt or Android.mk etc.) and sync your project.
@dumganhar Also met this issue, but i donāt have the issue. I donāt know why. Can you debug the cpp codes?