Error when trying to run Cocos2d-JS project on Android - android

The error I get is in this part:
running: '"C:\apache-ant-1.9.4\bin\ant" clean debug -f C:\Users\Robert\Desktop\N
ormero\Games\Aztec\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir="C:\a
ndroid-sdk"'
The filename, directory name, or volume label syntax is incorrect.
Error running command, return code: 1
I'm running:
cocos run -p android
On windows 7 64bit. I have googled but I'm stumped. Also I'm not a genius in Java nor Android, hence I use Cocos JS.
EDIT: Someone pointed out to me that the dot (.) in proj.android might be causing the issue. Any way I can fix this easily?
EDIT2: It happens during the compile, but the weird thing is, I can execute the command it says it errors on, and then it goes BUILD SUCCESFUL.

Your python version is not suitable. reinstall python 2.7.5
and it will be work =)

I faced the exact same issue then searched and found that "The filename, directory name, or volume label syntax is incorrect" error message is probably related to Python.
The filename, directory name, or volume label syntax is incorrect
I have both Python 2 and 3 in my machine but my PATH is pointing to 2.7.0 due to failsafe setup for some node.js projects. Then I reviewed the release note of Python 2.7 below:
https://hg.python.org/cpython/raw-file/v2.7.12/Misc/NEWS
And found there are numerous issues are associated with path. Without touching cocos2d first, I decided to remove 2.7.0 and installed 2.7.8. (just an old binary)
The propblem was solved immediately.
(Thanks justderb to remind and more details are provided.)

Related

Module not found running npx react-native start

I've been wrestling with this problem of a module not being found when starting from a new or existing (ejected from expo) react-native project. After searching SO for similar problems, the errors thrown in those problems were too different for me to piece a solution from them.
Here is the command line after running the exact command:
Module not found
So overall I don't know what's really going on here. Errors are being thrown in a lot of files that are abstracted from what I usually work on.
At first, I was working with an ejected expo project but stepped away from that to start a fresh react-native CLI project following the quick start guide from the docs. I followed everything with no obvious impediment until it comes to actually executing the project.
The first thing I tried was deleting the node modules and running npm install. Note: I did not delete the package-lock.json though. I also ran a command to --force delete the cache at some point. I think I did that before I tried to delete node altogether and start from the absolute latest LTS version. During the quickstart, I ran choco install -y nodejs.install openjdk8 which installed version 16 of node and jdk8. I did already have jdk11; am I not using this kit correctly maybe?
Earlier in the day, the trace to where the error could not be found did NOT include react-native-community/cli in the path until I ran the above choco install. So it had some effect but still, nothing about the actual error changed. In the docs, it says explicitly that react-native-cli (or something like it) is packaged in with node.js so there is no need to run npm install #react-native-commmunity/cli. But, I've read conflicting solutions saying that, in fact, I do need it. Alas, installing #react-native-community/cli or react-native-cli globally had no effect.
At this point, I'm assuming the information/file I need is there but my computer is pointed to the wrong place. In the folder 'Work' there is no #react-native-community\cli\build\bin.js.
The .bin folder in node_modules: react-native files in .bin
To be honest I don't really understand these files but maybe something warrants changing? I can post a picture at request but I'm doubting a change is needed here.
Thank you for reading. Hopefully, I can get this up and running because my only avenue to meet my user stories is to manipulate the native android code.
Well, I feel silly but I learned something.
The reason the command didn't work was because one of my folders was named 'Routing&DeliveryApp'. Apparently, having an ampersand in the name will throw off the computer. So, it was cut off right after the ampersand searching in a folder named 'DeliveryApp' which did not exist.
Still felt like a eureka moment though. Hopefully this might help someone in the future.

Errors when using buildozer to compile kivy/python 3.7 app into android apk on OSX - Silex & pypandoc

I've made an app using kivy and python 3.7, on OSX. It runs quite well within the PyCharm environment. However, buildozer keeps throwing up errors when I try to compile the app with buildozer.
I have installed the latest buildozer using the pip3.7 command. I have even updated python-for-android to test it out. I am also currently using the Android NDK r19c, although I have tried it with r17c and r20. Neither have worked.
Originally, I had errors relating to the use of pip, instead of pip3.7, since buildozer would try to use python 2.7 in some areas. This was solved by uninstalling buildozer etc. and reinstalling with pip3.7. Those errors have gone but at the moment, I seem to be getting new errors, related to 'Silex' and pypandoc, which is strange since I don't believe buildozer even uses those.
The error codes have too many characters to allow me to post them directly here, so please see the error codes as a page on my website. The links are below:
https://apilotslens.com/buildozer-silex-error
I then install the most recent version of Silex, which stops this error coming. However, a new error comes, relating to pypandoc:
https://apilotslens.com/buildozer-pypandoc-error
Even when I install pypandoc, the error keeps appearing.
I am very confused at this point. I have supposedly done everything by the book, so that buildozer will compile my APK. I really hope someone can help me. As far as I am aware, Buildozer doesn't even use Silex or pypandoc, so why would they be appearing? They haven't even been mentioned before. I really want to get this sorted soon.
Thanks in advance!
I'm pretty sure I haven't touched the file manually at all. The only thing I have tried is a clean: buildozer android clean but that hasn't got it working.
This only cleans the build, not the full cache. Delete /Users/JGolding/Desktop/FlightPlanningApp/PythonCode/Drafts/Draft1/.buildozer and try again.
Wait, do you mean shlex or silex?
It should read import shlex. Your file reads import silex.
Here's the link to the toolchain.py file you mentioned:
This looks good except for the shlex->silex change.
I thought I'd try uninstalling and reinstalling buildozer (pip3.7 uninstall buildozer) but interestingly, it says Can't uninstall 'buildozer'. No files were found to uninstall.
This is something unrelated arising from your pip invocation targeting the wrong directory or something.
I then install the most recent version of Silex, which stops this error coming. However, a new error comes, relating to pypandoc:
This is also unrelated, it's just that the silex module doesn't support python 3. The silex module was always a red herring, it's just the letter switch in your copy of toolchain.py that is wrong.
Note that if you read the error, it isn't complaining about pypandoc but about SyntaxError: Missing parentheses in call to 'print'..

Cordova build path failure in netbeans and node.js

I'm having an error that I can't find a solution for. I'm trying to get the Android emulator to work with a Cordova application in Netbeans 8.0. I get this error:
Creating android project...
Running command: C:\Users\SS&S\.cordova\lib\android\cordova\3.4.0\bin\create.bat --cli C:\xampp\htdocs\CordovaMapsSample\platforms\android com.coolappz.CordovaMapsSample CordovaMapsSample
'C:\Users\SS' is not recognized as an internal or external command,
operable program or batch file.
I have git, node.js, and cordova installed in their most recent versions, confirmed via the command prompt. I have checked my path in my environment variables for the Android Dev tools, and I've tried two versions of that path variable defined with and without escaping the ampersand with a caret (^). The issue shows up either way.
I still think the error is related to the ampersand, but I'm out of things that I know about to change.
Edit one: I've already modified the build path under environment variables. My problem persists. This is what I have:
%Path%;%ANDROID_PLATFORM_TOOLS%;%ANDROID_TOOLS%;C:\Users\SS^&S\AppData\Roaming\npm;C:\Users\SS^&S\AppData\Roaming\npm
Solved by creating a different user without ampersand in name.

Configuring Android to use in terminal for Linux Mint

I am currently using Eclipse to develop Android apps. Following the Android Developer tutorial, they had the option to program using the command line. I am interested in doing it this way but ran into a number of errors. I have tried several solutions available on the internet and I fear that I might have added to many things on my PATH file. None of the solutions have worked for me.
I am very lost with all these directories. Please help for Linux Mint specific distribution.
Key errors to address are:
android: command not found
and
ant debug
Buildfile: build.xml does not exist!
Build failed
I downloaded adt-bundle-linux-x86-20130717.
Update:
I think I managed to get the android command working by hardcoding the following on my bash.bashrc:
/etc/.../sdk/tools
/etc/.../sdk/platform-tools
Please let me know if it is recommended to do this another way.
However, ant debug is still not working.
If ADB is properly in your path, the android command should launch the SDK updater. Here is what I have in my .bashrc
# SDK
PATH=${PATH}:~/android-sdk/tools
PATH=${PATH}:~/android-sdk/platform-tools
You put the environment variable configuration in which files? configuration is completed, use the source command to run the file, or try to restart the computer

I keep getting a "[...]/bin/*-ar: not found" error while building the V8 javascript engine for Android

I'm trying to build the V8 javascript engine for Android but I can't succeed for some reason. I follow the instructions given here. It all starts very well. I can issue the make android_arm.release -j8 command from my terminal and it seems very sweet for a while. Then suddenly I get this output:
/bin/sh: 1: /home/dbm/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/*-ar: not found
The statement is correct: there is no *-ar file at the specified location.
But what is an *-ar file? And how can I resolve this error?
The environment is a beast running Ubuntu 12.10 on a 64-bit architecture (with ia32-libs installed) and I build for/with/against Android NDK r8c.
There seems to be a problem in Ubuntu!?
Anyway - extracting via tar -jxf worked for me. See http://code.google.com/p/android/issues/detail?id=41187
The issue lies with the fact that the NDK build system prefixes the platform name to the commands that are run to build the source. If you notice the error you get, the correct platform prefix is missing from *-ar. Somehow, the platform name is being set to * instead of the correct prefix arm-linux-androideabi (giving the correct name arm-linux-androideabi-ar). You'll need to figure out where this information is being skipped. That should fix your problem.
PS. If I get some free time, I'll try and replicate your issue and see if I can give you the exact fix.
Use the 'tar -jxf' to extract the android ndk. If you use the 'Extract here' option, it seems to be leaving out some files.
ar is archive utility from gnu tools. Normally you should have a $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ar available in your tool chain. which looks like missing in yours.

Categories

Resources