I want to host a Node.js server on my Android device. So when looking around i stumbled over jxcore-cordova...especially this site Sitepoint How to run Node.js on Mobile
Following this tutorial i got the bat and also the sh and ran it. First i got the eror that the command jx can not be found. So i installed JXCore for Windows from here: JXCore Github Releases
Afterwards i get these errors:
module.js:2098
throw err;
^
Error: Package is either corrupted or not compatible with this JX binary. (....\.jx\npmjxv311.jx)
at Object.Module._extensions..jx (module.js:2095:15)
at Module.load (module.js:440:36)
at Function.Module._load (module.js:405:12)
at Function.Module.runMain (module.js:878:12)
at startup (node.js:485:18)
at node.js:1604:3
Downloading the file. Please wait...
module.js:802
throw err;
^
Error: Cannot find module '....\jxcore-cord
ova\hello\node_modules\download-cli\cli.js'
at Function.Module._oldRes (module.js:800:15)
at Function.Module._resolveFilename (module.js:1768:19)
at Function.Module._load (module.js:360:25)
at Function.Module.runMain (module.js:878:12)
at startup (node.js:485:18)
at node.js:1604:3
Der Befehl "rm" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
module.js:802
throw err;
^
Error: Cannot find module '....\jxcore-cord
ova\hello\io.jxcore.node.jx'
at Function.Module._oldRes (module.js:800:15)
at Function.Module._resolveFilename (module.js:1768:19)
at Function.Module._load (module.js:360:25)
at Function.Module.runMain (module.js:878:12)
at startup (node.js:485:18)
at node.js:1604:3
Incorrect sample folder 'io.jxcore.node\sample\express_sample\www'.
Thinking that maybe you have to go through the "Installation" steps on the JXCore-Cordova Github page i started doing that but when executing android_compile.sh with the path to the downloaded Android NPK i get the out_android folder and some other folders but they are all empty.
Now my questions are:
Am I missing something or am i doing something wrong?
And is jxcore-cordova still the best (and only) way to run a node.js app on Android?
Btw: I looked through stackoverflow and found no other questions with this error. The ones that sound similar solved it with one of the things i tried and failed with. I also tried a different 2 different PCs with the install_and_run file but no difference.
Related
I have already compiled this simple example on windows using this https://kotlinlang.org/docs/tutorials/native/using-command-line-compiler.html
Then I tried to set up my arch Linux environment, using this
https://snapcraft.io/install/kotlin-native/arch
while also installing the android sdk from AUR using this,
https://noirscape.github.io/guides/2018/06/14/android-sdk-arch-linux.html
ls gives this - build build.gradle.kts main.kt. README.md settings.gradle.kts src
I am not using gradle for this problem but it is installed
cat main.kt gives this -
fun main() {
println("Hello Kotlin/Native!")
}
when I run kotlinc-native main.kt -o build/hello
I get error: compilation failed: /var/lib/snapd/snap/kotlin-native/13/konan/nativelib/libllvmstubs.so: /snap/core/current/lib/x86_64-linux-gnu/librt.so.1:undefined symbol: __clock_nanosleep, version GLIBC_PRIVATE
*source files main.kt
*compiler version info: Konan: 0.9.3 / Kotlin: 1.3.0
*Output Kind PROGRAM
exception: java.lang.unsatisfiedLinkError: /var/lib/snapd/snap/kotlin-native/13/konan/nativelib/libllvmstubs.so: /snap/core/current/lib/x86_64-linux-gnu/librt.so.1 undefined symbol: __clock_nanosleep, version GLIBC_PRIVATE
then there are a lot of at java.base at llvm.llvm and at org.jetbrains.kotlin after that. If those are important I can let me know.
I am a baby kotlin user and a baby Linux user. I believe learning starts from the bottom up so I really want to understand what is happening here instead of just solving it by using gradle or android studios.
I have a feeling that the compiler might not have downloaded all the dependencies on its first run or maybe this has something to do with the symbolic link I made from the first link. please help me understand
ps. I am also sharing a git repo for this project across the two OS's. So maybe this is windows getting in the way but I cant really see how that could be.
I have to test my hybrid mobile application on my android device,I have selected "USB debugging" in my phone and I have selected the "Unknown sources" option,but when I try to deploy my application in my mobile I get this error:
Building package: [D:\WebMobile\test\backupsProjetWebMobile2\KendoUITabStrip1\obj\Debug\MyProjet.zip]
Project files uploaded to the cloud.
Sending build request for project MyProjet with parameters ProjectTypeGuids={070BCB52-5A75-4F8C-A973-144AF0EAFCC9}
Platform=Android
Configuration=Debug
LiveSyncToken=5uW/86s7080iMfWs0yNn+vJIKWo6n1qh4Lpa8kEnoUNFIaJOOQSDimQ9e0N6ELxXgt2bTOb/Xp6eRqCttuaoxQCzlLku533tlF1hvwrKPpxPeX/CfV/aGFN8Wr6MJl4D.
C:\Users\Client\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\zc3hmmck.xbh\Targets\Build.targets(189,3): error : Server build failed. Server output: Project "MyProjet.tmp.proj" (default targets):
android Build Tooling revision 2015.11.03.5r
Warning: Failed to install 'cordova-plugin-mapbox':Error: Variable(s) missing: ACCESS_TOKEN
at /home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/cordova-lib/cordova-lib/src/plugman/install.js:324:23
at _fulfilled (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:749:13)
at /home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:557:44
at flush (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Warning: Variable(s) missing: ACCESS_TOKEN
Warning: /home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189
Warning: throw Error("exit code: " + code);
^
Warning: Error: exit code: 1
at Error (<anonymous>)
at ChildProcess.<anonymous> (/home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189:14)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
Error: Build failed during execution
Error: 'Build failed with error code 8'
Done building project "MyProjet.tmp.proj" -- FAILED.
.
Done building project "MyProjet.iceproj" -- FAILED.
Build FAILED.
I work with Telerik-AppBuilder visual Studio 2015 extension(kendo-ui) my android phone is Samsung Galaxy Star Duos GT-S7262 version 4.1.2
any help please and thanks
update:
I have folloewed this link [https://github.com/Telerik-Verified-Plugins/Mapbox] but I get this error:1
C:\Users\Admin>cordova plugin add https://github.com/Telerik-Verified-Plugins/Mapbox --variable ACCESS_TOKEN=my.access.token
Current working directory is not a Cordova-based project.
I have installed the cordova-plugins with npm,but I still get the problem :(
So the question boils down to: how in Visual Studio do you provide Cordova variables to plugins?
(You tried adding the plugin from the c:/users/admin folder which is not your project folder, that's why the Cordova CLI said: "Current working directory is not a Cordova-based project.")
I'm assuming you're using the AppBuilder extension for Visual Studio. If so, please read this doc, especially about how to configure variables:
http://docs.telerik.com/platform/appbuilder/creating-your-project/using-plugins/using-verified-plugins/install-verified-plugins
When I am trying to run my Android application using Titanium Studio, I got error like this..
[INFO] : Making sure the adb server is running
[ERROR] Application Installer abnormal process termination. Process exit value was 1
C:\Users\Ganeshk\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:185
throw e;
^
patchedLog [as log] (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\cli\commands\build.js:299:22),target.(anonymous function) [as error] (C:\Users\Ganeshk\AppData\Roaming\npm\node_modules\titanium\node_modules\winston\lib\winston\common.js:45:21),C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:399:13,C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:232:13,C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:136:21,C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:229:17,C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:556:34,C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:455:4,ChildProcess.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\node-appc\lib\subprocess.js:60:3)
I am using:
OS: Windows 8,
npm: 2.7.4,
Titanium: 3.4.2
Option-1:
Confirm that you have 0.10.X version of node.js
Option-2
Can you try the following change. This involves modifying a file, so would request you to keep a backup of the file.
Go to the following folder:
C:\ProgramData\Titanium\mobilesdk\win32\3.5.0.GA\node_modules\titanium-sdk\lib\
Open the file windows.js and edit the following line (should be near the end)
if (!selectedVisualStudio) return next();
and change it to:
return next();
Let us know if either of this two approach worked for you. For me, option-2 worked in one of our windows machine.
Can't build streamer tutorial_3 for android on mac
I,ve got all environment variables needed.
My eclipse can't to resolve some symbols, but to some of them i can get by pushing F3. It's very strange for me.
Here is the command line output:
23:04:06 **** Build of configuration Default for project Tutorial3 ****
/Users/antonivanuskin/android-develop/android-ndk-r10/ndk-build all
GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c
GStreamer : [COMPILE] => gst-build-armeabi/gstreamer_android.c
GStreamer : [LINK] => gst-build-armeabi/libgstreamer_android.so
lto1: fatal error: bytecode stream generated with LTO version 2.2 instead of the expected 3.0
compilation terminated.
lto-wrapper: /Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm- linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc returned 1 exit status
/Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [buildsharedlibrary_armeabi] Error 1
23:04:10 Build Finished (took 3s.740ms)*
I use ndk-10r and gst-1.4.0.
I know that there is no interfaces/xoverlay in new streamer.
EDIT
I've built ok, but steel got underlines of many glib-types and GST-macross. Here is a screenshot:
what is interesting that i have no underlined headers, for example: i've include pthread.h but have got underlined pthread_t and phtread_key_t....
i think that i have not install some general libraries on my mac, something like libc or what ever...may it couse this problem? The problem is that i can't run my app from eclipse. and for more: i use DS-5 CE IDE
This is most likely because we build the android 1.4.x cerbero packages with the r9d NDK.
You might want to use the r9d NDK until we provide binaries built with a more recent NDK (started some builds to see if everything goes through fine).
I've been trying to run a Phonegap application locally with this command:
phonegap local run android
Though I keep getting this error:
C:\Users\OmaR\Desktop\New folder\myapp>phonegap local run android [phonegap] compiling Android... [error] An error occurred while building the android project. module.js:340
throw err;
^ Error: Cannot find module 'C:\Users\OmaR\Desktop\New'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Try doing the same process in some new folder where the folder name does not have any space in it.
In the above case the folder name is "New folder".
Try with folder name without spaces.