Update: We need help testing v3.17 (it's only a few weeks away)

Update: We need help testing v3.17 (it's only a few weeks away)
0.0 0

#41

Let me take a look at how we can improve and make sure everything is working as expected. I’ll get back by tonight my time.

One thing I will say is that I will try to find a solution that works through android studio since from what I’ve heard, cocos console will be deprecated soon.

@zhangxm @slackmoehrle Correct me if I am wrong about coocs console being deprecated


#42

I don’t think cocos console is being deprecated. I think what you might mean is that Android development via the command-line has been deprecated and now proj.android is an Android Studio project.


#43

@mozartalouis A bit updates - https://github.com/cocos2d/cocos2d-x/pull/18154

So [CMake] One build system to rule them all. Because cross-platform libs need cross-platform build systems for prebuilts I hope cmake will be used in near future…


#44

Update: V3.17 is a few weeks away.


#45

Found problem: “cocos gen-libs” does not work for latest commit 9275dda539d61e4a1ca9fba48ae53becff35d047

20:09:58 g:\j\A>cocos gen-libs -p android -m release --ap android-15 --app-abi armeabi-v7a:x86 
20:09:58 running: 'g:\j\A\external\cocos2d-x\tools/cocos2d-console/bin\cocos.bat compile -s g:\j\A\external\cocos2d-x\tests/cpp-empty-test -p android --mode release --app-abi armeabi-v7a:x86 --ap android-15'
20:09:58 
20:10:00 Building mode: release
20:10:00 Using Android Studio project : g:\j\A\external\cocos2d-x\tests\cpp-empty-test\proj.android
20:10:00 Building apk...
20:10:00 Please input the absolute/relative path of '.keystore' file:
20:10:00 Traceback (most recent call last):
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\bin\/cocos.py", line 1072, in <module>
20:10:00     run_plugin(command, argv, plugins)
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\bin\/cocos.py", line 961, in run_plugin
20:10:00     plugin.run(argv, dependencies_objects)
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\project_compile.py", line 1519, in run
20:10:00     self.build_android()
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\project_compile.py", line 537, in build_android
20:10:00     self.apk_path = builder.do_build_apk(build_mode, self._no_apk, output_dir, self._custom_step_args, self._ap, self)
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\build_android.py", line 555, in do_build_apk
20:10:00     self._gather_sign_info()
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\build_android.py", line 587, in _gather_sign_info
20:10:00     inputed = self._get_user_input(MultiLanguage.get_string('COMPILE_TIP_INPUT_KEYSTORE'))
20:10:00   File "g:\j\A\external\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\build_android.py", line 617, in _get_user_input
20:10:00     ret = raw_input()
20:10:00 EOFError: EOF when reading a line
20:10:00 Error running command, return code: 1.

#46

I get further than you, but I am using android-22

BUILD SUCCESSFUL in 8m 3s
54 actionable tasks: 25 executed, 29 up-to-date
Move apk to /Users/dubb/Cocos/cocos2d-x/tests/cpp-empty-test/bin/debug/android
Build succeed.
Traceback (most recent call last):
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 1072, in <module>
    run_plugin(command, argv, plugins)
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 961, in run_plugin
    plugin.run(argv, dependencies_objects)
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py", line 79, in run
    self.compile()
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py", line 176, in compile
    self.compile_android()
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/plugins/plugin_generate/gen_libs.py", line 368, in compile_android
    cocos.copy_files_with_config(copy_cfg, obj_dir, android_out_dir)
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 799, in copy_files_with_config
    src_dir, src_dir, dst_dir, include_rules, exclude_rules)
  File "/Users/dubb/Cocos/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 818, in copy_files_with_rules
    for name in os.listdir(src):
OSError: [Errno 2] No such file or directory: '/Users/dubb/Cocos/cocos2d-x/tests/cpp-empty-test/proj.android/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a:x86'

#47

It seems, that you can’t use two ABIs in one command. Your error tries to find a weird folder.


#48

You are correct. building for just one works for me.


#49

It seems like incorrect version is compiled: I see “debug” but there is option “-m release”


#50

Have you created any GitHub issues for this yet?


#51

@slackmoehrle Are you sure that:

  1. you are running “cocos gen-libs -p android -m release --ap android-15 --app-abi armeabi-v7a:x86”. With -m release
  2. you have latest cocos2d-x with latest tools/cocos2d-console?
  3. you have latest ndk-16b

I just cloned latest cocos2d-x in clean environment and have following error

g:\cocos_latest\subrepos\repos>cocos gen-libs -p android -m release --ap android-15 --app-abi armeabi-v7a:x86
running: 'g:\cocos_latest\subrepos\external\cocos2d-x\tools/cocos2d-console/bin\cocos.bat compile -s g:\cocos_latest\subrepos\external\cocos2d-x\tests/cpp-empty-test -p android --mode release --app-abi armeabi-v7a:x86 --ap android-15'

Building mode: release
Using Android Studio project : g:\cocos_latest\subrepos\external\cocos2d-x\tests\cpp-empty-test\proj.android
Building apk...
Please input the absolute/relative path of '.keystore' file:

without “-m release” I have similar error to your:
“cocos gen-libs -p android -m release --ap android-15 --app-abi armeabi-v7a:x86”

Move apk to g:\repos\cocos2d-x\tests\cpp-empty-test\bin\debug\android
Build succeed.
Traceback (most recent call last):
  File "g:\repos\cocos2d-x\tools\cocos2d-console\bin\/cocos.py", line 1072, in <module>
    run_plugin(command, argv, plugins)
  File "g:\repos\cocos2d-x\tools\cocos2d-console\bin\/cocos.py", line 961, in run_plugin
    plugin.run(argv, dependencies_objects)
  File "g:\repos\cocos2d-x\tools\cocos2d-console\plugins\plugin_generate\gen_libs.py", line 79, in run
    self.compile()
  File "g:\repos\cocos2d-x\tools\cocos2d-console\plugins\plugin_generate\gen_libs.py", line 176, in compile
    self.compile_android()
  File "g:\repos\cocos2d-x\tools\cocos2d-console\plugins\plugin_generate\gen_libs.py", line 368, in compile_android
    cocos.copy_files_with_config(copy_cfg, obj_dir, android_out_dir)
  File "g:\repos\cocos2d-x\tools\cocos2d-console\bin\cocos.py", line 799, in copy_files_with_config
    src_dir, src_dir, dst_dir, include_rules, exclude_rules)
  File "g:\repos\cocos2d-x\tools\cocos2d-console\bin\cocos.py", line 818, in copy_files_with_rules
    for name in os.listdir(src):
WindowsError: [Error 267] The directory name is invalid: 'g:\\repos\\cocos2d-x\\tests/cpp-empty-test\\proj.android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a:x86/*.*'

#52

@CrazyHappyGame

Yes.

Yes

I am using Android-22, not Android-15, however


#53

@slackmoehrle Below prove that in clean env (CI Linux/Windows VM) it fails:


https://travis-ci.org/cocos2d/cocos2d-x/jobs/370779819
https://ci.appveyor.com/project/minggo/cocos2d-x/build/job/ewmuivdbc3dtpydt


#54

It might fail with Android-15, but it doesn’t fail for Android-22. But we should still probably fix.