Cocos2d-x compile android cannot run program - cocos2d-x

created new cocos2d-x 3.6 project with cocos console comnand new -l cpp, all variables are set by running setup.py, then when i try to run cocos compile i get compilation errors.
log: log.txt
Cheked if there are spaces in paths but there isn't, everything is installed.

the problem is here
Execute failed: java.io.IOEx ception:
Cannot run program"D:\MyCppGame\cocos2d\cocos\platform\android\java\${
aapt}"
(in directory "D:\MyCppGame\cocos2d\cocos\platform\android\java"):
Create Process error=2, The system cannot find the file specified
You can solve it by adding some lines to the SDK/tools/ant/build.xml
https://stackoverflow.com/a/30807140

Related

cannot open /lib/ld-linux-aarch64.so.1 in qemu or gem5

I am trying to simulate a simple Hello world ARM example on my desktop computer. I tried both qemu and gem5. Both gives a similar error. They cannot find ld-linux-aarch64.so.1. Actually I cannot find it either. If I could find it, I will show it with -L (in qemu) or --redirects (in gem5).
The file is:
armhello: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=23a21b7a545ac510923b6b3713d2bbee092f820a, for GNU/Linux 3.7.0, not stripped
It is compiled with: aarch64-linux-gnu-gcc
I am trying to run it in qemu with:
qemu-aarch64 armhello
I got this error:
/lib/ld-linux-aarch64.so.1: No such file or directory
I try to run it in gem5 with: (simpleARM.py points to my executable (named as armhello))
build/ARM/gem5.opt configs/tutorial/simpleARM.py
I got this error:
panic: panic condition fd < 0 occurred: Failed to open file /lib/ld-linux-aarch64.so.1.
How can I solve this?
Note: I know it works when compiled --static. But I need to run more complex binaries that are dynamically linked and I cannot change those. This is just an example.
For gem5 you can use --redirects and --interp-dir: How to run a dynamically linked executable syscall emulation mode se.py in gem5?
For qemu you need -L: Using dynamic linker with qemu-arm
same problem on x86_64 machine docker build with an arm64 docker image:
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM alpine
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/
# add this line to resolve
RUN apk add libc6-compat

Created jar from JRuby file using warbler. Application exit/goes in a blink when run

I have created a JRuby desktop application. Now I need to create installation file for different platforms(Windows, Linux, Mac).
I have created .jar file using warbler. But when I try to run the .jar, application starts and exit in a blink. It seems application is not crashing as the log says got via java -jar MyApp.jar > log.txt.
Why the application exit, doesn't just stay. Can somebody help me on what I am missing. How I can track the issue?
This answer will help for the issue: JRuby script with Rubeus and Swing exiting once packaged into jar using warble
The workaround described is to put below code in your App's main file
event_thread = nil
SwingUtilities.invokeAndWait { event_thread = java.lang.Thread.currentThread }
event_thread.join

cocos 2dx version 3.15 --no-native argument not recognised

I am using cocos2dx version 3.15, python version is 2.7.12, java version is 1.8.
The problem is when i try to create a web only project
using cocos new projectName -l js --no-native command, it gives me this error:
cocos new: error: unrecognized arguments: --no-native.
Nowhere in the docs have i found that this command is deprecated/removed.
I have searched a lot for this error, but nobody seem to be getting the same error.
What may be the possible reason for this?
Thanks.
cocos new projectName -l js --no-native
Above command is used for cocos studio, as cocos studio is canceled, the command was removed. There is a PR for the same.

LibGDX creating (desktop) platform runnable

I want to export may project (game) to different desktop platforms. I exported it from eclipse (on Windows) and I get JAR file. On my machine I can start it, but on other it won't work. I guess JRE is missing there.
So, I followed LibGDX instructions how to deploy on different platforms:
https://github.com/libgdx/libgdx/wiki/Deploying-your-application
But when I run that packr.jar app I get following output:
D:\packing>java -jar packr.jar windows.json
Output directory 'D:\packing\windows' exists, deleting
Unpacking JRE
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
copying resources
minimizing JRE
unpacking rt.jar
packing rt.jar
Done!
After that I really get my exe file, all together with jre dir, my original game jar file and some config.json file, but that exe file just won't run. No failure message, just won't run. Any idea what's going on here? Or maybe there is some other tool for packing jar files?
All I need is to make my game runnable on desktop platforms: Windows, Mac & Linux.
For windows OS you could use something like launch4j which simply puts a wrapper around your jar file.
It also has the capability to provide a given jre. So your users do not need to have one installed.
Ok, solved this.
So I've found out that if I run exe file from console (cmd) and redirect output to file I can have some error report regarding the run attempt. So I did that:
myapp.exe > log.txt
and get log this log file:
Loading JVM runtime library ...
Passing VM options ...
# -Xmx1G
Creating Java VM ...
Error occurred during initialization of VM
Unable to load ZIP library: D:\packing\windows\jre\bin\zip.dll
Zip file was there, but something was wrong with it so I replaced it with one I had in my Java installation (my was larger). After that I was able to run exe file well.

Rawr-created jar throws ClassDefNotFoundError

I am trying to use Rawr to turn a simple 3-file Ruby project into an executable jar to be run on Ubuntu. I ran jruby -S rawr install to create the Rakefile and set up the directory layout. All my .rb files are under the src directory at the root of the project. When I run jruby -S rake rawr:jar, it compiles all the Ruby files and creates the jar just fine. It then places it in my deploy directory along with lib/java/jruby-complete.jar.
I try executing the jar from inside deploy with java -jar hg_analyzer.jar. However, when I do this I am greeted with this error:
Exception in thread "main" <script>:1:in `require': Linkage error loading compiled script; you may need to recompile 'file:/home/marcw/Documents/hg_analyzer/deploy/jar/hg_analyzer.jar!/main.class': java.lang.NoClassDefFoundError: org/jruby/ast/executable/AbstractScript$RuntimeCache (LoadError)
from <script>:1
...internal jruby stack elided...
from Kernel.require(<script>:1)
from (unknown).(unknown)(:1)
I've also tried running it as java -cp lib/java/** -jar hg_analyzer.jar, but to no avail. The Class-Path entry in the jar's manifest file looks okay as well. main.rb is the main Ruby file.
Running java with the -verbose option shows that it is finding the JRuby jar and is loading it from the expected location.
Any ideas?
Figured it out! The problem was that Rawr was downloading version 1.5 of the JRuby runtime and I have version 1.4 of the compiler on my system.