Cordova add android error - javascript

I trying add cordova android app and getting a json parsing error.
I think that it is cordova error, because I can create and test my projects with ionic and phonegap at Android Emulator.
C:\>cordova create hello hello.cd.cm HelloWorld
Creating a new cordova project with name "HelloWorld" and id "hello.cd.cm" at lo
cation "C:\hello"
C:\>cd hello
C:\hello>cordova platform add android -verbose
No version supplied. Retrieving version from config.xml...
CordovaError: Unable to fetch platform android: Error: Failed to parse json
Unexpected token
at C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\cordo
va-lib\src\cordova\platform.js:194:15
at _rejected (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_mo
dules\q\q.js:797:24)
at C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.j
s:823:30
at Promise.when (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node
_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\user\AppData\Roaming\npm\node_m
odules\cordova\node_modules\q\q.js:741:41)
at C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.j
s:557:44
at flush (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_module
s\q\q.js:108:17)
at process._tickCallback (node.js:355:11)
Help me please.
UPD:
I degrade cordova from 4.3.0 to 4.2.0 and it works now. But it is not normal of course...

Related

Unable to launch Nativescript App in iOS simulator

when I run tns run ios, i get the following error:
Unable to apply changes on device: E152B60E-D109-4BF3-A03A-F1DC42AB9252. Error is: Command xcrun with arguments simctl install E152B60E-D109-4BF3-A03A-F1DC42AB9252 /Applications/nativeOne/HelloApp/platforms/ios/build/Debug-iphonesimulator/HelloApp.app failed with exit code 1. Error output:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Failed to chmod /Users/dim/Library/Developer/CoreSimulator/Devices/E152B60E-D109-4BF3-A03A-F1DC42AB9252/data/Bundle/Application/51605A25-4EC5-4D66-9E5D-4EFE1F9632AF/HelloApp.app/HelloApp : No such file or directory
Underlying error (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/dim/Library/Developer/CoreSimulator/Devices/E152B60E-D109-4BF3-A03A-F1DC42AB9252/data/Bundle/Application/51605A25-4EC5-4D66-9E5D-4EFE1F9632AF/HelloApp.app/HelloApp : No such file or directory
I've tried everthing possible, re-installed node.
flushed my cache...
the simulator works fine with flutter apps.
Nativescript CLI works fine with Android emulator. The only prob;em is getting it gto work on ios one.
Please help

react-native run-ios TypeError: invalid data

I'm trying to run react-native on my machine. I'm using elementaryOS which is based on Ubuntu 14.04. I create base app with
react-native init hello_world
then I try to run this as ios app:
react-native run-ios
this returns me following error:
mateusz#mateusz-L702X:~/hello_world $ react-native run-ios
Found Xcode project hello_world.xcodeproj
/home/mateusz/hello_world/node_modules/promise/lib/done.js:10
throw err;
^
TypeError: invalid data
at WriteStream.Socket.write (net.js:625:11)
at Object.execFileSync (child_process.js:482:20)
at _runIOS (runIOS.js:62:19)
at runIOS.js:24:5
at tryCallTwo (/home/mateusz/hello_world/node_modules/promise/lib/core.js:45:5)
at doResolve (/home/mateusz/hello_world/node_modules/promise/lib/core.js:200:13)
at new Promise (/home/mateusz/hello_world/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/home/mateusz/hello_world/node_modules/react-native/local-cli/cli.js:87:13)
at Object.<anonymous> (/usr/lib/node_modules/react-native-cli/index.js:88:7)
How can I fix that?
You can build react-native iOS app in Mac only. Using Linux you will not be able to build iOS. Mostly error is related to that.

App Crashes on Android 6 because module has text relocations

This is the error I got using adb logcat:
W V8Object: (KrollRuntimeThread) [33,34] Runtime disposed, cannot set property 'userAgent'
E linker : /data/app/com.app.id/lib/arm/module.id: has text relocations
I'm having this error when try to run my Titanium app on Android 6 device. As far as I know, this is something related to the NDK and my modules.
My problem is that I'm using around 5 or 6 modules on my app and I'm not able to recompile all of them. So, what can I do?
I also check this ticket:
https://jira.appcelerator.org/browse/TIMOB-19369
and also these issues on some modules repositories:
https://github.com/manumaticx/TiCrouton/issues/8
https://github.com/appcelerator-modules/ti.inappbilling/issues/14
My environment:
Ti SDK 5.1.2.GA
Android 6.0.1 on Nexus
My Android SDK:
important: it doesn't happen on any simulator
Thanks!

while creating cordova project: incorrect header check at Zlib._binding.onerror (zlib.js)

while i am creating a cordova project through the cmd on windows 7 i am getting the following error.
Error: incorrect header check
at Zlib._binding.onerror (zlib.js:295:17)
we are using the cordova version of 3.6.3-0.2.13

Phonegap 3.0 build error for Android on Windows 7

I installed the new PhoneGap 3.0 CLI tool on Windows 7 and can create the sample app using:
$ phonegap create hello com.example.helloworld HelloWorld
But this produces an error:
$ phonegap build android
Here is the error:
events.js:72
throw er; // Unhandled 'error' event
Error: read ENOTCONN
What do I have to do to get the app to build successfully?
Problem was that I was using a Cygwin command line interface, and it prepends its own path to a specified file path.
Executing the commands in the standard Windows Command Prompt worked fine.

Categories

Resources