PhoneGap Error: Cannot find module '<project_folder>' - android

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.

Related

building ionic project for android with cordova

I'm trying to build my ionic project on windows..
when i run cordova build android, it will reach this and then it will stop and end!
ANDROID_HOME=C:\Users\Lama Tatwany\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk-10
why will it stop? what is the problem exactly?
Running ionic cordova build android result:
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (57)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.5.0
at module.exports (C:\Users\Lama Tatwany\Downloads\wesalApp\node_modules\node-sass\lib\binding.js:13:13)
at Object. (C:\Users\Lama Tatwany\Downloads\wesalApp\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\Lama Tatwany\Downloads\wesalApp\node_modules\#ionic\app-scripts\dist\sass.js:12:19)
Can you post command you used for building app?
You should use : Ionic cordova build android.
Do you get any error?

Can't install jxcore-cordova

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.

Ionic Package Build Android failed - dont understand error message

This is the error message:
Fetching plugin "cordova-plugin-device" via npm
shell.js: internal error
Error: ENOSPC, no space left on device '/home/package/workspace/apps-483d2a0c-2/cordova/plugins/cordova-plugin-device/src/blackberry10'
at Error (native)
at Object.fs.mkdirSync (fs.js:747:18)
at cpdirSyncRecursive (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:58:8)
at cpdirSyncRecursive (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:73:7)
at /usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:180:9
at Array.forEach (native)
at Object._cp (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:157:11)
at Object.cp (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/common.js:186:23)
at copyPlugin (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:289:15)
at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:159:27
working on cloud9. tried to package simple app.
Command was:
ionic package build android
can someone explain me what this error means?
The error means there is no space left on your disk (in cloud9).

can't deploy my AppBuilder project on android device

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

Robolectric: class file for org.robolectric.util.ShadowProvider not found

I just downloaded the Robolectric samples and tried to build it, but I'm getting an error:
$ git clone https://github.com/robolectric/robolectric-samples.git
(Edited settings.gradle to remove the api-16 and api-19 samples, so I'm only building android-api-21.)
Now when I do gradle test it fails at task ':android-api-21:compileTestDebugJava':
:android-api-21:compileTestDebugJava
/tmp/robolectric-samples/android-api-21/src/test/java/com/example/activity/MainActivityTest.java:14: error: cannot access ShadowProvider
import static org.robolectric.Shadows.shadowOf;
^
class file for org.robolectric.util.ShadowProvider not found
/tmp/robolectric-samples/android-api-21/src/test/java/com/example/activity/MainActivityTest.java:23: error: cannot find symbol
final Menu menu = shadowOf(activity).getOptionsMenu();
^
symbol: method shadowOf(Activity)
location: class MainActivityTest
2 errors
:android-api-21:compileTestDebugJava FAILED
I guess it's possible that it's just a temporary problem with the 3.0-SNAPSHOT build or am I doing something wrong?
Some more info:
OS X Yosemite
I have the latest Android SDK 21 and build tools 21.1.2 installed
I deleted my ~/.m2 and ~/.gradle/caches directories first
ran ./gradlew --refresh-dependencies test

Categories

Resources